From c19d53dfe726438eb7a587da826ed724c39bcea0 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 20 Aug 2025 03:13:13 +1200 Subject: [PATCH 1/7] Add 1.8.x support --- README.md | 8 +- docs/examples/java/databases/create.md | 1 + .../java/tablesdb/create-boolean-column.md | 28 + .../java/tablesdb/create-datetime-column.md | 28 + .../java/tablesdb/create-email-column.md | 28 + .../java/tablesdb/create-enum-column.md | 29 + .../java/tablesdb/create-float-column.md | 30 + docs/examples/java/tablesdb/create-index.md | 30 + .../java/tablesdb/create-integer-column.md | 30 + .../java/tablesdb/create-ip-column.md | 28 + .../tablesdb/create-relationship-column.md | 31 + docs/examples/java/tablesdb/create-row.md | 27 + docs/examples/java/tablesdb/create-rows.md | 25 + .../java/tablesdb/create-string-column.md | 30 + docs/examples/java/tablesdb/create-table.md | 28 + .../java/tablesdb/create-url-column.md | 28 + docs/examples/java/tablesdb/create.md | 26 + .../java/tablesdb/decrement-row-column.md | 28 + docs/examples/java/tablesdb/delete-column.md | 25 + docs/examples/java/tablesdb/delete-index.md | 25 + docs/examples/java/tablesdb/delete-row.md | 25 + docs/examples/java/tablesdb/delete-rows.md | 25 + docs/examples/java/tablesdb/delete-table.md | 24 + docs/examples/java/tablesdb/delete.md | 23 + docs/examples/java/tablesdb/get-column.md | 25 + docs/examples/java/tablesdb/get-index.md | 25 + docs/examples/java/tablesdb/get-row.md | 26 + docs/examples/java/tablesdb/get-table.md | 24 + docs/examples/java/tablesdb/get.md | 23 + .../java/tablesdb/increment-row-column.md | 28 + docs/examples/java/tablesdb/list-columns.md | 25 + docs/examples/java/tablesdb/list-indexes.md | 25 + docs/examples/java/tablesdb/list-rows.md | 25 + docs/examples/java/tablesdb/list-tables.md | 25 + docs/examples/java/tablesdb/list.md | 24 + .../java/tablesdb/update-boolean-column.md | 28 + .../java/tablesdb/update-datetime-column.md | 28 + .../java/tablesdb/update-email-column.md | 28 + .../java/tablesdb/update-enum-column.md | 29 + .../java/tablesdb/update-float-column.md | 30 + .../java/tablesdb/update-integer-column.md | 30 + .../java/tablesdb/update-ip-column.md | 28 + .../tablesdb/update-relationship-column.md | 27 + docs/examples/java/tablesdb/update-row.md | 27 + docs/examples/java/tablesdb/update-rows.md | 26 + .../java/tablesdb/update-string-column.md | 29 + docs/examples/java/tablesdb/update-table.md | 28 + .../java/tablesdb/update-url-column.md | 28 + docs/examples/java/tablesdb/update.md | 25 + docs/examples/java/tablesdb/upsert-row.md | 27 + docs/examples/java/tablesdb/upsert-rows.md | 25 + docs/examples/kotlin/databases/create.md | 3 +- .../kotlin/tablesdb/create-boolean-column.md | 19 + .../kotlin/tablesdb/create-datetime-column.md | 19 + .../kotlin/tablesdb/create-email-column.md | 19 + .../kotlin/tablesdb/create-enum-column.md | 20 + .../kotlin/tablesdb/create-float-column.md | 21 + docs/examples/kotlin/tablesdb/create-index.md | 21 + .../kotlin/tablesdb/create-integer-column.md | 21 + .../kotlin/tablesdb/create-ip-column.md | 19 + .../tablesdb/create-relationship-column.md | 22 + docs/examples/kotlin/tablesdb/create-row.md | 18 + docs/examples/kotlin/tablesdb/create-rows.md | 16 + .../kotlin/tablesdb/create-string-column.md | 21 + docs/examples/kotlin/tablesdb/create-table.md | 19 + .../kotlin/tablesdb/create-url-column.md | 19 + docs/examples/kotlin/tablesdb/create.md | 17 + .../kotlin/tablesdb/decrement-row-column.md | 19 + .../examples/kotlin/tablesdb/delete-column.md | 16 + docs/examples/kotlin/tablesdb/delete-index.md | 16 + docs/examples/kotlin/tablesdb/delete-row.md | 16 + docs/examples/kotlin/tablesdb/delete-rows.md | 16 + docs/examples/kotlin/tablesdb/delete-table.md | 15 + docs/examples/kotlin/tablesdb/delete.md | 14 + docs/examples/kotlin/tablesdb/get-column.md | 16 + docs/examples/kotlin/tablesdb/get-index.md | 16 + docs/examples/kotlin/tablesdb/get-row.md | 17 + docs/examples/kotlin/tablesdb/get-table.md | 15 + docs/examples/kotlin/tablesdb/get.md | 14 + .../kotlin/tablesdb/increment-row-column.md | 19 + docs/examples/kotlin/tablesdb/list-columns.md | 16 + docs/examples/kotlin/tablesdb/list-indexes.md | 16 + docs/examples/kotlin/tablesdb/list-rows.md | 16 + docs/examples/kotlin/tablesdb/list-tables.md | 16 + docs/examples/kotlin/tablesdb/list.md | 15 + .../kotlin/tablesdb/update-boolean-column.md | 19 + .../kotlin/tablesdb/update-datetime-column.md | 19 + .../kotlin/tablesdb/update-email-column.md | 19 + .../kotlin/tablesdb/update-enum-column.md | 20 + .../kotlin/tablesdb/update-float-column.md | 21 + .../kotlin/tablesdb/update-integer-column.md | 21 + .../kotlin/tablesdb/update-ip-column.md | 19 + .../tablesdb/update-relationship-column.md | 18 + docs/examples/kotlin/tablesdb/update-row.md | 18 + docs/examples/kotlin/tablesdb/update-rows.md | 17 + .../kotlin/tablesdb/update-string-column.md | 20 + docs/examples/kotlin/tablesdb/update-table.md | 19 + .../kotlin/tablesdb/update-url-column.md | 19 + docs/examples/kotlin/tablesdb/update.md | 16 + docs/examples/kotlin/tablesdb/upsert-row.md | 18 + docs/examples/kotlin/tablesdb/upsert-rows.md | 16 + src/main/kotlin/io/appwrite/Client.kt | 6 +- src/main/kotlin/io/appwrite/Query.kt | 18 + src/main/kotlin/io/appwrite/enums/Type.kt | 12 + .../kotlin/io/appwrite/models/BucketList.kt | 2 +- .../io/appwrite/models/CollectionList.kt | 2 +- .../io/appwrite/models/ColumnBoolean.kt | 94 + .../io/appwrite/models/ColumnDatetime.kt | 102 + .../kotlin/io/appwrite/models/ColumnEmail.kt | 102 + .../kotlin/io/appwrite/models/ColumnEnum.kt | 110 + .../kotlin/io/appwrite/models/ColumnFloat.kt | 110 + .../kotlin/io/appwrite/models/ColumnIndex.kt | 102 + .../io/appwrite/models/ColumnIndexList.kt | 38 + .../io/appwrite/models/ColumnInteger.kt | 110 + .../kotlin/io/appwrite/models/ColumnIp.kt | 102 + .../kotlin/io/appwrite/models/ColumnList.kt | 38 + .../io/appwrite/models/ColumnRelationship.kt | 134 + .../kotlin/io/appwrite/models/ColumnString.kt | 110 + .../kotlin/io/appwrite/models/ColumnUrl.kt | 102 + .../io/appwrite/models/ContinentList.kt | 2 +- .../kotlin/io/appwrite/models/CountryList.kt | 2 +- .../kotlin/io/appwrite/models/CurrencyList.kt | 2 +- .../kotlin/io/appwrite/models/Database.kt | 8 + .../kotlin/io/appwrite/models/DatabaseList.kt | 2 +- .../io/appwrite/models/DeploymentList.kt | 2 +- .../kotlin/io/appwrite/models/DocumentList.kt | 2 +- .../io/appwrite/models/ExecutionList.kt | 2 +- .../kotlin/io/appwrite/models/FileList.kt | 2 +- .../io/appwrite/models/FrameworkList.kt | 2 +- .../kotlin/io/appwrite/models/FunctionList.kt | 2 +- .../kotlin/io/appwrite/models/IdentityList.kt | 2 +- src/main/kotlin/io/appwrite/models/Index.kt | 42 +- .../kotlin/io/appwrite/models/IndexList.kt | 2 +- .../kotlin/io/appwrite/models/LanguageList.kt | 2 +- .../io/appwrite/models/LocaleCodeList.kt | 2 +- src/main/kotlin/io/appwrite/models/LogList.kt | 2 +- .../io/appwrite/models/MembershipList.kt | 2 +- .../kotlin/io/appwrite/models/MessageList.kt | 2 +- .../kotlin/io/appwrite/models/PhoneList.kt | 2 +- .../kotlin/io/appwrite/models/ProviderList.kt | 2 +- .../io/appwrite/models/ResourceTokenList.kt | 2 +- src/main/kotlin/io/appwrite/models/Row.kt | 105 + src/main/kotlin/io/appwrite/models/RowList.kt | 46 + .../kotlin/io/appwrite/models/RuntimeList.kt | 2 +- .../kotlin/io/appwrite/models/SessionList.kt | 2 +- .../kotlin/io/appwrite/models/SiteList.kt | 2 +- .../io/appwrite/models/SpecificationList.kt | 2 +- .../io/appwrite/models/SubscriberList.kt | 2 +- src/main/kotlin/io/appwrite/models/Table.kt | 102 + .../kotlin/io/appwrite/models/TableList.kt | 38 + .../kotlin/io/appwrite/models/TargetList.kt | 2 +- .../kotlin/io/appwrite/models/TeamList.kt | 2 +- .../kotlin/io/appwrite/models/TopicList.kt | 2 +- .../kotlin/io/appwrite/models/UserList.kt | 2 +- .../kotlin/io/appwrite/models/VariableList.kt | 2 +- .../kotlin/io/appwrite/services/Account.kt | 6 + .../kotlin/io/appwrite/services/Databases.kt | 425 ++- .../kotlin/io/appwrite/services/TablesDb.kt | 2391 +++++++++++++++++ 158 files changed, 6608 insertions(+), 118 deletions(-) create mode 100644 docs/examples/java/tablesdb/create-boolean-column.md create mode 100644 docs/examples/java/tablesdb/create-datetime-column.md create mode 100644 docs/examples/java/tablesdb/create-email-column.md create mode 100644 docs/examples/java/tablesdb/create-enum-column.md create mode 100644 docs/examples/java/tablesdb/create-float-column.md create mode 100644 docs/examples/java/tablesdb/create-index.md create mode 100644 docs/examples/java/tablesdb/create-integer-column.md create mode 100644 docs/examples/java/tablesdb/create-ip-column.md create mode 100644 docs/examples/java/tablesdb/create-relationship-column.md create mode 100644 docs/examples/java/tablesdb/create-row.md create mode 100644 docs/examples/java/tablesdb/create-rows.md create mode 100644 docs/examples/java/tablesdb/create-string-column.md create mode 100644 docs/examples/java/tablesdb/create-table.md create mode 100644 docs/examples/java/tablesdb/create-url-column.md create mode 100644 docs/examples/java/tablesdb/create.md create mode 100644 docs/examples/java/tablesdb/decrement-row-column.md create mode 100644 docs/examples/java/tablesdb/delete-column.md create mode 100644 docs/examples/java/tablesdb/delete-index.md create mode 100644 docs/examples/java/tablesdb/delete-row.md create mode 100644 docs/examples/java/tablesdb/delete-rows.md create mode 100644 docs/examples/java/tablesdb/delete-table.md create mode 100644 docs/examples/java/tablesdb/delete.md create mode 100644 docs/examples/java/tablesdb/get-column.md create mode 100644 docs/examples/java/tablesdb/get-index.md create mode 100644 docs/examples/java/tablesdb/get-row.md create mode 100644 docs/examples/java/tablesdb/get-table.md create mode 100644 docs/examples/java/tablesdb/get.md create mode 100644 docs/examples/java/tablesdb/increment-row-column.md create mode 100644 docs/examples/java/tablesdb/list-columns.md create mode 100644 docs/examples/java/tablesdb/list-indexes.md create mode 100644 docs/examples/java/tablesdb/list-rows.md create mode 100644 docs/examples/java/tablesdb/list-tables.md create mode 100644 docs/examples/java/tablesdb/list.md create mode 100644 docs/examples/java/tablesdb/update-boolean-column.md create mode 100644 docs/examples/java/tablesdb/update-datetime-column.md create mode 100644 docs/examples/java/tablesdb/update-email-column.md create mode 100644 docs/examples/java/tablesdb/update-enum-column.md create mode 100644 docs/examples/java/tablesdb/update-float-column.md create mode 100644 docs/examples/java/tablesdb/update-integer-column.md create mode 100644 docs/examples/java/tablesdb/update-ip-column.md create mode 100644 docs/examples/java/tablesdb/update-relationship-column.md create mode 100644 docs/examples/java/tablesdb/update-row.md create mode 100644 docs/examples/java/tablesdb/update-rows.md create mode 100644 docs/examples/java/tablesdb/update-string-column.md create mode 100644 docs/examples/java/tablesdb/update-table.md create mode 100644 docs/examples/java/tablesdb/update-url-column.md create mode 100644 docs/examples/java/tablesdb/update.md create mode 100644 docs/examples/java/tablesdb/upsert-row.md create mode 100644 docs/examples/java/tablesdb/upsert-rows.md create mode 100644 docs/examples/kotlin/tablesdb/create-boolean-column.md create mode 100644 docs/examples/kotlin/tablesdb/create-datetime-column.md create mode 100644 docs/examples/kotlin/tablesdb/create-email-column.md create mode 100644 docs/examples/kotlin/tablesdb/create-enum-column.md create mode 100644 docs/examples/kotlin/tablesdb/create-float-column.md create mode 100644 docs/examples/kotlin/tablesdb/create-index.md create mode 100644 docs/examples/kotlin/tablesdb/create-integer-column.md create mode 100644 docs/examples/kotlin/tablesdb/create-ip-column.md create mode 100644 docs/examples/kotlin/tablesdb/create-relationship-column.md create mode 100644 docs/examples/kotlin/tablesdb/create-row.md create mode 100644 docs/examples/kotlin/tablesdb/create-rows.md create mode 100644 docs/examples/kotlin/tablesdb/create-string-column.md create mode 100644 docs/examples/kotlin/tablesdb/create-table.md create mode 100644 docs/examples/kotlin/tablesdb/create-url-column.md create mode 100644 docs/examples/kotlin/tablesdb/create.md create mode 100644 docs/examples/kotlin/tablesdb/decrement-row-column.md create mode 100644 docs/examples/kotlin/tablesdb/delete-column.md create mode 100644 docs/examples/kotlin/tablesdb/delete-index.md create mode 100644 docs/examples/kotlin/tablesdb/delete-row.md create mode 100644 docs/examples/kotlin/tablesdb/delete-rows.md create mode 100644 docs/examples/kotlin/tablesdb/delete-table.md create mode 100644 docs/examples/kotlin/tablesdb/delete.md create mode 100644 docs/examples/kotlin/tablesdb/get-column.md create mode 100644 docs/examples/kotlin/tablesdb/get-index.md create mode 100644 docs/examples/kotlin/tablesdb/get-row.md create mode 100644 docs/examples/kotlin/tablesdb/get-table.md create mode 100644 docs/examples/kotlin/tablesdb/get.md create mode 100644 docs/examples/kotlin/tablesdb/increment-row-column.md create mode 100644 docs/examples/kotlin/tablesdb/list-columns.md create mode 100644 docs/examples/kotlin/tablesdb/list-indexes.md create mode 100644 docs/examples/kotlin/tablesdb/list-rows.md create mode 100644 docs/examples/kotlin/tablesdb/list-tables.md create mode 100644 docs/examples/kotlin/tablesdb/list.md create mode 100644 docs/examples/kotlin/tablesdb/update-boolean-column.md create mode 100644 docs/examples/kotlin/tablesdb/update-datetime-column.md create mode 100644 docs/examples/kotlin/tablesdb/update-email-column.md create mode 100644 docs/examples/kotlin/tablesdb/update-enum-column.md create mode 100644 docs/examples/kotlin/tablesdb/update-float-column.md create mode 100644 docs/examples/kotlin/tablesdb/update-integer-column.md create mode 100644 docs/examples/kotlin/tablesdb/update-ip-column.md create mode 100644 docs/examples/kotlin/tablesdb/update-relationship-column.md create mode 100644 docs/examples/kotlin/tablesdb/update-row.md create mode 100644 docs/examples/kotlin/tablesdb/update-rows.md create mode 100644 docs/examples/kotlin/tablesdb/update-string-column.md create mode 100644 docs/examples/kotlin/tablesdb/update-table.md create mode 100644 docs/examples/kotlin/tablesdb/update-url-column.md create mode 100644 docs/examples/kotlin/tablesdb/update.md create mode 100644 docs/examples/kotlin/tablesdb/upsert-row.md create mode 100644 docs/examples/kotlin/tablesdb/upsert-rows.md create mode 100644 src/main/kotlin/io/appwrite/enums/Type.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnBoolean.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnDatetime.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnEmail.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnEnum.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnFloat.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnIndex.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnIndexList.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnInteger.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnIp.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnList.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnRelationship.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnString.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnUrl.kt create mode 100644 src/main/kotlin/io/appwrite/models/Row.kt create mode 100644 src/main/kotlin/io/appwrite/models/RowList.kt create mode 100644 src/main/kotlin/io/appwrite/models/Table.kt create mode 100644 src/main/kotlin/io/appwrite/models/TableList.kt create mode 100644 src/main/kotlin/io/appwrite/services/TablesDb.kt diff --git a/README.md b/README.md index 9ddec575..8469be2e 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-kotlin.svg?color=green&style=flat-square) ![License](https://img.shields.io/github/license/appwrite/sdk-for-kotlin.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) -**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 SDK is compatible with Appwrite server version 1.8.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:9.1.2") +implementation("io.appwrite:sdk-for-kotlin:10.0.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: io.appwrite sdk-for-kotlin - 9.1.2 + 10.0.0 ``` diff --git a/docs/examples/java/databases/create.md b/docs/examples/java/databases/create.md index 31cd37e1..6db46550 100644 --- a/docs/examples/java/databases/create.md +++ b/docs/examples/java/databases/create.md @@ -13,6 +13,7 @@ databases.create( "", // databaseId "", // name false, // enabled (optional) + .TABLESDB, // type (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tablesdb/create-boolean-column.md b/docs/examples/java/tablesdb/create-boolean-column.md new file mode 100644 index 00000000..76976cec --- /dev/null +++ b/docs/examples/java/tablesdb/create-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createBooleanColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + false, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-datetime-column.md b/docs/examples/java/tablesdb/create-datetime-column.md new file mode 100644 index 00000000..5608fdaf --- /dev/null +++ b/docs/examples/java/tablesdb/create-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createDatetimeColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-email-column.md b/docs/examples/java/tablesdb/create-email-column.md new file mode 100644 index 00000000..098a5858 --- /dev/null +++ b/docs/examples/java/tablesdb/create-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createEmailColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + "email@example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-enum-column.md b/docs/examples/java/tablesdb/create-enum-column.md new file mode 100644 index 00000000..1a56df8b --- /dev/null +++ b/docs/examples/java/tablesdb/create-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createEnumColumn( + "", // databaseId + "", // tableId + "", // key + listOf(), // elements + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-float-column.md b/docs/examples/java/tablesdb/create-float-column.md new file mode 100644 index 00000000..af9a3e35 --- /dev/null +++ b/docs/examples/java/tablesdb/create-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createFloatColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-index.md b/docs/examples/java/tablesdb/create-index.md new file mode 100644 index 00000000..b33ba2ca --- /dev/null +++ b/docs/examples/java/tablesdb/create-index.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; +import io.appwrite.enums.IndexType; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createIndex( + "", // databaseId + "", // tableId + "", // key + IndexType.KEY, // type + listOf(), // columns + listOf(), // orders (optional) + listOf(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-integer-column.md b/docs/examples/java/tablesdb/create-integer-column.md new file mode 100644 index 00000000..313f53d9 --- /dev/null +++ b/docs/examples/java/tablesdb/create-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createIntegerColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-ip-column.md b/docs/examples/java/tablesdb/create-ip-column.md new file mode 100644 index 00000000..d995ea85 --- /dev/null +++ b/docs/examples/java/tablesdb/create-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createIpColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-relationship-column.md b/docs/examples/java/tablesdb/create-relationship-column.md new file mode 100644 index 00000000..8aa904fe --- /dev/null +++ b/docs/examples/java/tablesdb/create-relationship-column.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; +import io.appwrite.enums.RelationshipType; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createRelationshipColumn( + "", // databaseId + "", // tableId + "", // relatedTableId + RelationshipType.ONETOONE, // type + false, // twoWay (optional) + "", // key (optional) + "", // twoWayKey (optional) + RelationMutate.CASCADE, // onDelete (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-row.md b/docs/examples/java/tablesdb/create-row.md new file mode 100644 index 00000000..6a379cfd --- /dev/null +++ b/docs/examples/java/tablesdb/create-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createRow( + "", // databaseId + "", // tableId + "", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-rows.md b/docs/examples/java/tablesdb/create-rows.md new file mode 100644 index 00000000..0e8a46ec --- /dev/null +++ b/docs/examples/java/tablesdb/create-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createRows( + "", // databaseId + "", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-string-column.md b/docs/examples/java/tablesdb/create-string-column.md new file mode 100644 index 00000000..63886630 --- /dev/null +++ b/docs/examples/java/tablesdb/create-string-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createStringColumn( + "", // databaseId + "", // tableId + "", // key + 1, // size + false, // required + "", // default (optional) + false, // array (optional) + false, // encrypt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-table.md b/docs/examples/java/tablesdb/create-table.md new file mode 100644 index 00000000..1c546bf4 --- /dev/null +++ b/docs/examples/java/tablesdb/create-table.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createTable( + "", // databaseId + "", // tableId + "", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-url-column.md b/docs/examples/java/tablesdb/create-url-column.md new file mode 100644 index 00000000..6e2caff9 --- /dev/null +++ b/docs/examples/java/tablesdb/create-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createUrlColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + "https://example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create.md b/docs/examples/java/tablesdb/create.md new file mode 100644 index 00000000..446e89d9 --- /dev/null +++ b/docs/examples/java/tablesdb/create.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.create( + "", // databaseId + "", // name + false, // enabled (optional) + .TABLESDB, // type (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/decrement-row-column.md b/docs/examples/java/tablesdb/decrement-row-column.md new file mode 100644 index 00000000..82fbddff --- /dev/null +++ b/docs/examples/java/tablesdb/decrement-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.decrementRowColumn( + "", // databaseId + "", // tableId + "", // rowId + "", // column + 0, // value (optional) + 0, // min (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/delete-column.md b/docs/examples/java/tablesdb/delete-column.md new file mode 100644 index 00000000..2dbfb452 --- /dev/null +++ b/docs/examples/java/tablesdb/delete-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.deleteColumn( + "", // databaseId + "", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/delete-index.md b/docs/examples/java/tablesdb/delete-index.md new file mode 100644 index 00000000..ac045c1d --- /dev/null +++ b/docs/examples/java/tablesdb/delete-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.deleteIndex( + "", // databaseId + "", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/delete-row.md b/docs/examples/java/tablesdb/delete-row.md new file mode 100644 index 00000000..f0ce9ffc --- /dev/null +++ b/docs/examples/java/tablesdb/delete-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.deleteRow( + "", // databaseId + "", // tableId + "", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/delete-rows.md b/docs/examples/java/tablesdb/delete-rows.md new file mode 100644 index 00000000..e6ebd662 --- /dev/null +++ b/docs/examples/java/tablesdb/delete-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.deleteRows( + "", // databaseId + "", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/delete-table.md b/docs/examples/java/tablesdb/delete-table.md new file mode 100644 index 00000000..e7004659 --- /dev/null +++ b/docs/examples/java/tablesdb/delete-table.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.deleteTable( + "", // databaseId + "", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/delete.md b/docs/examples/java/tablesdb/delete.md new file mode 100644 index 00000000..8f00c7f7 --- /dev/null +++ b/docs/examples/java/tablesdb/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.delete( + "", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/get-column.md b/docs/examples/java/tablesdb/get-column.md new file mode 100644 index 00000000..4c641956 --- /dev/null +++ b/docs/examples/java/tablesdb/get-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.getColumn( + "", // databaseId + "", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/get-index.md b/docs/examples/java/tablesdb/get-index.md new file mode 100644 index 00000000..469d6aa7 --- /dev/null +++ b/docs/examples/java/tablesdb/get-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.getIndex( + "", // databaseId + "", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/get-row.md b/docs/examples/java/tablesdb/get-row.md new file mode 100644 index 00000000..5bc6a012 --- /dev/null +++ b/docs/examples/java/tablesdb/get-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.getRow( + "", // databaseId + "", // tableId + "", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/get-table.md b/docs/examples/java/tablesdb/get-table.md new file mode 100644 index 00000000..a03f008a --- /dev/null +++ b/docs/examples/java/tablesdb/get-table.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.getTable( + "", // databaseId + "", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/get.md b/docs/examples/java/tablesdb/get.md new file mode 100644 index 00000000..c5c0a640 --- /dev/null +++ b/docs/examples/java/tablesdb/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.get( + "", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/increment-row-column.md b/docs/examples/java/tablesdb/increment-row-column.md new file mode 100644 index 00000000..4ad5954f --- /dev/null +++ b/docs/examples/java/tablesdb/increment-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.incrementRowColumn( + "", // databaseId + "", // tableId + "", // rowId + "", // column + 0, // value (optional) + 0, // max (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/list-columns.md b/docs/examples/java/tablesdb/list-columns.md new file mode 100644 index 00000000..0d5dca61 --- /dev/null +++ b/docs/examples/java/tablesdb/list-columns.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.listColumns( + "", // databaseId + "", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/list-indexes.md b/docs/examples/java/tablesdb/list-indexes.md new file mode 100644 index 00000000..3450f1e7 --- /dev/null +++ b/docs/examples/java/tablesdb/list-indexes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.listIndexes( + "", // databaseId + "", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/list-rows.md b/docs/examples/java/tablesdb/list-rows.md new file mode 100644 index 00000000..91737670 --- /dev/null +++ b/docs/examples/java/tablesdb/list-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.listRows( + "", // databaseId + "", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/list-tables.md b/docs/examples/java/tablesdb/list-tables.md new file mode 100644 index 00000000..4b99430e --- /dev/null +++ b/docs/examples/java/tablesdb/list-tables.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.listTables( + "", // databaseId + 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/tablesdb/list.md b/docs/examples/java/tablesdb/list.md new file mode 100644 index 00000000..3d690597 --- /dev/null +++ b/docs/examples/java/tablesdb/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.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/tablesdb/update-boolean-column.md b/docs/examples/java/tablesdb/update-boolean-column.md new file mode 100644 index 00000000..bd93250e --- /dev/null +++ b/docs/examples/java/tablesdb/update-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateBooleanColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + false, // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/update-datetime-column.md b/docs/examples/java/tablesdb/update-datetime-column.md new file mode 100644 index 00000000..ac81f43f --- /dev/null +++ b/docs/examples/java/tablesdb/update-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateDatetimeColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/update-email-column.md b/docs/examples/java/tablesdb/update-email-column.md new file mode 100644 index 00000000..a8f5e134 --- /dev/null +++ b/docs/examples/java/tablesdb/update-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateEmailColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + "email@example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/update-enum-column.md b/docs/examples/java/tablesdb/update-enum-column.md new file mode 100644 index 00000000..24dd809a --- /dev/null +++ b/docs/examples/java/tablesdb/update-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateEnumColumn( + "", // databaseId + "", // tableId + "", // key + listOf(), // elements + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/update-float-column.md b/docs/examples/java/tablesdb/update-float-column.md new file mode 100644 index 00000000..5875225e --- /dev/null +++ b/docs/examples/java/tablesdb/update-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateFloatColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/update-integer-column.md b/docs/examples/java/tablesdb/update-integer-column.md new file mode 100644 index 00000000..ef5f3298 --- /dev/null +++ b/docs/examples/java/tablesdb/update-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateIntegerColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/update-ip-column.md b/docs/examples/java/tablesdb/update-ip-column.md new file mode 100644 index 00000000..c7010e48 --- /dev/null +++ b/docs/examples/java/tablesdb/update-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateIpColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/update-relationship-column.md b/docs/examples/java/tablesdb/update-relationship-column.md new file mode 100644 index 00000000..f417691d --- /dev/null +++ b/docs/examples/java/tablesdb/update-relationship-column.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateRelationshipColumn( + "", // databaseId + "", // tableId + "", // key + RelationMutate.CASCADE, // onDelete (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/update-row.md b/docs/examples/java/tablesdb/update-row.md new file mode 100644 index 00000000..9756aa13 --- /dev/null +++ b/docs/examples/java/tablesdb/update-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateRow( + "", // databaseId + "", // tableId + "", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/update-rows.md b/docs/examples/java/tablesdb/update-rows.md new file mode 100644 index 00000000..e813de2f --- /dev/null +++ b/docs/examples/java/tablesdb/update-rows.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateRows( + "", // databaseId + "", // tableId + 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/tablesdb/update-string-column.md b/docs/examples/java/tablesdb/update-string-column.md new file mode 100644 index 00000000..115a2595 --- /dev/null +++ b/docs/examples/java/tablesdb/update-string-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateStringColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + "", // default + 1, // size (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/update-table.md b/docs/examples/java/tablesdb/update-table.md new file mode 100644 index 00000000..1bcd8a9a --- /dev/null +++ b/docs/examples/java/tablesdb/update-table.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateTable( + "", // databaseId + "", // tableId + "", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/update-url-column.md b/docs/examples/java/tablesdb/update-url-column.md new file mode 100644 index 00000000..0b15649a --- /dev/null +++ b/docs/examples/java/tablesdb/update-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateUrlColumn( + "", // databaseId + "", // tableId + "", // key + false, // required + "https://example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/update.md b/docs/examples/java/tablesdb/update.md new file mode 100644 index 00000000..3c29c3cb --- /dev/null +++ b/docs/examples/java/tablesdb/update.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.update( + "", // databaseId + "", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/upsert-row.md b/docs/examples/java/tablesdb/upsert-row.md new file mode 100644 index 00000000..6eaf665f --- /dev/null +++ b/docs/examples/java/tablesdb/upsert-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.upsertRow( + "", // databaseId + "", // tableId + "", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/upsert-rows.md b/docs/examples/java/tablesdb/upsert-rows.md new file mode 100644 index 00000000..4af4f611 --- /dev/null +++ b/docs/examples/java/tablesdb/upsert-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.upsertRows( + "", // databaseId + "", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/kotlin/databases/create.md b/docs/examples/kotlin/databases/create.md index 04c64801..ef53fe36 100644 --- a/docs/examples/kotlin/databases/create.md +++ b/docs/examples/kotlin/databases/create.md @@ -12,5 +12,6 @@ val databases = Databases(client) val response = databases.create( databaseId = "", name = "", - enabled = false // optional + enabled = false, // optional + type = "tablesdb" // optional ) diff --git a/docs/examples/kotlin/tablesdb/create-boolean-column.md b/docs/examples/kotlin/tablesdb/create-boolean-column.md new file mode 100644 index 00000000..befa8438 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createBooleanColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = false, // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-datetime-column.md b/docs/examples/kotlin/tablesdb/create-datetime-column.md new file mode 100644 index 00000000..01130c8f --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createDatetimeColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-email-column.md b/docs/examples/kotlin/tablesdb/create-email-column.md new file mode 100644 index 00000000..9d47a820 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createEmailColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = "email@example.com", // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-enum-column.md b/docs/examples/kotlin/tablesdb/create-enum-column.md new file mode 100644 index 00000000..49b74308 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createEnumColumn( + databaseId = "", + tableId = "", + key = "", + elements = listOf(), + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-float-column.md b/docs/examples/kotlin/tablesdb/create-float-column.md new file mode 100644 index 00000000..db2dac01 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createFloatColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-index.md b/docs/examples/kotlin/tablesdb/create-index.md new file mode 100644 index 00000000..a0da817e --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-index.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb +import io.appwrite.enums.IndexType + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createIndex( + databaseId = "", + tableId = "", + key = "", + type = IndexType.KEY, + columns = listOf(), + orders = listOf(), // optional + lengths = listOf() // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-integer-column.md b/docs/examples/kotlin/tablesdb/create-integer-column.md new file mode 100644 index 00000000..6297cdfa --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createIntegerColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-ip-column.md b/docs/examples/kotlin/tablesdb/create-ip-column.md new file mode 100644 index 00000000..67052c85 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createIpColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-relationship-column.md b/docs/examples/kotlin/tablesdb/create-relationship-column.md new file mode 100644 index 00000000..c1f13049 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-relationship-column.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb +import io.appwrite.enums.RelationshipType + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createRelationshipColumn( + databaseId = "", + tableId = "", + relatedTableId = "", + type = RelationshipType.ONETOONE, + twoWay = false, // optional + key = "", // optional + twoWayKey = "", // optional + onDelete = "cascade" // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-row.md b/docs/examples/kotlin/tablesdb/create-row.md new file mode 100644 index 00000000..217f2eeb --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.createRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-rows.md b/docs/examples/kotlin/tablesdb/create-rows.md new file mode 100644 index 00000000..01a3554a --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createRows( + databaseId = "", + tableId = "", + rows = listOf() +) diff --git a/docs/examples/kotlin/tablesdb/create-string-column.md b/docs/examples/kotlin/tablesdb/create-string-column.md new file mode 100644 index 00000000..9061a1a0 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-string-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createStringColumn( + databaseId = "", + tableId = "", + key = "", + size = 1, + required = false, + default = "", // optional + array = false, // optional + encrypt = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-table.md b/docs/examples/kotlin/tablesdb/create-table.md new file mode 100644 index 00000000..f1603fbb --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-table.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createTable( + databaseId = "", + tableId = "", + name = "", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-url-column.md b/docs/examples/kotlin/tablesdb/create-url-column.md new file mode 100644 index 00000000..2c8f7af3 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createUrlColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = "https://example.com", // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/create.md b/docs/examples/kotlin/tablesdb/create.md new file mode 100644 index 00000000..e95e1fab --- /dev/null +++ b/docs/examples/kotlin/tablesdb/create.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.create( + databaseId = "", + name = "", + enabled = false, // optional + type = "tablesdb" // optional +) diff --git a/docs/examples/kotlin/tablesdb/decrement-row-column.md b/docs/examples/kotlin/tablesdb/decrement-row-column.md new file mode 100644 index 00000000..035fcedd --- /dev/null +++ b/docs/examples/kotlin/tablesdb/decrement-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.decrementRowColumn( + databaseId = "", + tableId = "", + rowId = "", + column = "", + value = 0, // optional + min = 0 // optional +) diff --git a/docs/examples/kotlin/tablesdb/delete-column.md b/docs/examples/kotlin/tablesdb/delete-column.md new file mode 100644 index 00000000..ef3eaaeb --- /dev/null +++ b/docs/examples/kotlin/tablesdb/delete-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.deleteColumn( + databaseId = "", + tableId = "", + key = "" +) diff --git a/docs/examples/kotlin/tablesdb/delete-index.md b/docs/examples/kotlin/tablesdb/delete-index.md new file mode 100644 index 00000000..4bca972b --- /dev/null +++ b/docs/examples/kotlin/tablesdb/delete-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.deleteIndex( + databaseId = "", + tableId = "", + key = "" +) diff --git a/docs/examples/kotlin/tablesdb/delete-row.md b/docs/examples/kotlin/tablesdb/delete-row.md new file mode 100644 index 00000000..4e2eee31 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/delete-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.deleteRow( + databaseId = "", + tableId = "", + rowId = "" +) diff --git a/docs/examples/kotlin/tablesdb/delete-rows.md b/docs/examples/kotlin/tablesdb/delete-rows.md new file mode 100644 index 00000000..c73332c1 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/delete-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.deleteRows( + databaseId = "", + tableId = "", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tablesdb/delete-table.md b/docs/examples/kotlin/tablesdb/delete-table.md new file mode 100644 index 00000000..87b20e58 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/delete-table.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.deleteTable( + databaseId = "", + tableId = "" +) diff --git a/docs/examples/kotlin/tablesdb/delete.md b/docs/examples/kotlin/tablesdb/delete.md new file mode 100644 index 00000000..3af192a0 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.delete( + databaseId = "" +) diff --git a/docs/examples/kotlin/tablesdb/get-column.md b/docs/examples/kotlin/tablesdb/get-column.md new file mode 100644 index 00000000..78710b65 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/get-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.getColumn( + databaseId = "", + tableId = "", + key = "" +) diff --git a/docs/examples/kotlin/tablesdb/get-index.md b/docs/examples/kotlin/tablesdb/get-index.md new file mode 100644 index 00000000..00c9285d --- /dev/null +++ b/docs/examples/kotlin/tablesdb/get-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.getIndex( + databaseId = "", + tableId = "", + key = "" +) diff --git a/docs/examples/kotlin/tablesdb/get-row.md b/docs/examples/kotlin/tablesdb/get-row.md new file mode 100644 index 00000000..98e92980 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/get-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.getRow( + databaseId = "", + tableId = "", + rowId = "", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tablesdb/get-table.md b/docs/examples/kotlin/tablesdb/get-table.md new file mode 100644 index 00000000..6484d408 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/get-table.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.getTable( + databaseId = "", + tableId = "" +) diff --git a/docs/examples/kotlin/tablesdb/get.md b/docs/examples/kotlin/tablesdb/get.md new file mode 100644 index 00000000..16a0739b --- /dev/null +++ b/docs/examples/kotlin/tablesdb/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.get( + databaseId = "" +) diff --git a/docs/examples/kotlin/tablesdb/increment-row-column.md b/docs/examples/kotlin/tablesdb/increment-row-column.md new file mode 100644 index 00000000..cccfde92 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/increment-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.incrementRowColumn( + databaseId = "", + tableId = "", + rowId = "", + column = "", + value = 0, // optional + max = 0 // optional +) diff --git a/docs/examples/kotlin/tablesdb/list-columns.md b/docs/examples/kotlin/tablesdb/list-columns.md new file mode 100644 index 00000000..e4b10d98 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/list-columns.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.listColumns( + databaseId = "", + tableId = "", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tablesdb/list-indexes.md b/docs/examples/kotlin/tablesdb/list-indexes.md new file mode 100644 index 00000000..231ddcc2 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/list-indexes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.listIndexes( + databaseId = "", + tableId = "", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tablesdb/list-rows.md b/docs/examples/kotlin/tablesdb/list-rows.md new file mode 100644 index 00000000..735c4257 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/list-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.listRows( + databaseId = "", + tableId = "", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tablesdb/list-tables.md b/docs/examples/kotlin/tablesdb/list-tables.md new file mode 100644 index 00000000..cb7d2d59 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/list-tables.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.listTables( + databaseId = "", + queries = listOf(), // optional + search = "" // optional +) diff --git a/docs/examples/kotlin/tablesdb/list.md b/docs/examples/kotlin/tablesdb/list.md new file mode 100644 index 00000000..e23135d7 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.list( + queries = listOf(), // optional + search = "" // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-boolean-column.md b/docs/examples/kotlin/tablesdb/update-boolean-column.md new file mode 100644 index 00000000..8090da09 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateBooleanColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = false, + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-datetime-column.md b/docs/examples/kotlin/tablesdb/update-datetime-column.md new file mode 100644 index 00000000..14f38d53 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateDatetimeColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-email-column.md b/docs/examples/kotlin/tablesdb/update-email-column.md new file mode 100644 index 00000000..52149182 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateEmailColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = "email@example.com", + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-enum-column.md b/docs/examples/kotlin/tablesdb/update-enum-column.md new file mode 100644 index 00000000..2e2be5ac --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateEnumColumn( + databaseId = "", + tableId = "", + key = "", + elements = listOf(), + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-float-column.md b/docs/examples/kotlin/tablesdb/update-float-column.md new file mode 100644 index 00000000..9519eb32 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateFloatColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-integer-column.md b/docs/examples/kotlin/tablesdb/update-integer-column.md new file mode 100644 index 00000000..db7e172b --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateIntegerColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-ip-column.md b/docs/examples/kotlin/tablesdb/update-ip-column.md new file mode 100644 index 00000000..bed46752 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateIpColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-relationship-column.md b/docs/examples/kotlin/tablesdb/update-relationship-column.md new file mode 100644 index 00000000..12a63607 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-relationship-column.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateRelationshipColumn( + databaseId = "", + tableId = "", + key = "", + onDelete = "cascade", // optional + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-row.md b/docs/examples/kotlin/tablesdb/update-row.md new file mode 100644 index 00000000..51e80144 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-rows.md b/docs/examples/kotlin/tablesdb/update-rows.md new file mode 100644 index 00000000..008665b6 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-rows.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateRows( + databaseId = "", + tableId = "", + data = mapOf( "a" to "b" ), // optional + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-string-column.md b/docs/examples/kotlin/tablesdb/update-string-column.md new file mode 100644 index 00000000..9890f956 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-string-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateStringColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = "", + size = 1, // optional + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-table.md b/docs/examples/kotlin/tablesdb/update-table.md new file mode 100644 index 00000000..a38286fd --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-table.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateTable( + databaseId = "", + tableId = "", + name = "", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/update-url-column.md b/docs/examples/kotlin/tablesdb/update-url-column.md new file mode 100644 index 00000000..ac0dcd2f --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateUrlColumn( + databaseId = "", + tableId = "", + key = "", + required = false, + default = "https://example.com", + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tablesdb/update.md b/docs/examples/kotlin/tablesdb/update.md new file mode 100644 index 00000000..93175078 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/update.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.update( + databaseId = "", + name = "", + enabled = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/upsert-row.md b/docs/examples/kotlin/tablesdb/upsert-row.md new file mode 100644 index 00000000..09286e40 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/upsert-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.upsertRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/kotlin/tablesdb/upsert-rows.md b/docs/examples/kotlin/tablesdb/upsert-rows.md new file mode 100644 index 00000000..cd335841 --- /dev/null +++ b/docs/examples/kotlin/tablesdb/upsert-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.upsertRows( + databaseId = "", + tableId = "", + rows = listOf() +) diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index 68a45cb6..41a68787 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -58,12 +58,12 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/9.1.2 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/10.0.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "9.1.2", - "x-appwrite-response-format" to "1.7.0", + "x-sdk-version" to "10.0.0", + "x-appwrite-response-format" to "1.8.0", ) config = mutableMapOf() diff --git a/src/main/kotlin/io/appwrite/Query.kt b/src/main/kotlin/io/appwrite/Query.kt index 6efbb118..bb344529 100644 --- a/src/main/kotlin/io/appwrite/Query.kt +++ b/src/main/kotlin/io/appwrite/Query.kt @@ -51,6 +51,24 @@ class Query( fun contains(attribute: String, value: Any) = Query("contains", attribute, parseValue(value)).toJson() + fun notContains(attribute: String, value: Any) = Query("notContains", attribute, parseValue(value)).toJson() + + fun notSearch(attribute: String, value: String) = Query("notSearch", attribute, listOf(value)).toJson() + + fun notBetween(attribute: String, start: Any, end: Any) = Query("notBetween", attribute, listOf(start, end)).toJson() + + fun notStartsWith(attribute: String, value: String) = Query("notStartsWith", attribute, listOf(value)).toJson() + + fun notEndsWith(attribute: String, value: String) = Query("notEndsWith", attribute, listOf(value)).toJson() + + fun createdBefore(value: String) = Query("createdBefore", null, listOf(value)).toJson() + + fun createdAfter(value: String) = Query("createdAfter", null, listOf(value)).toJson() + + fun updatedBefore(value: String) = Query("updatedBefore", null, listOf(value)).toJson() + + fun updatedAfter(value: String) = Query("updatedAfter", null, listOf(value)).toJson() + fun or(queries: List) = Query("or", null, queries.map { it.fromJson() }).toJson() fun and(queries: List) = Query("and", null, queries.map { it.fromJson() }).toJson() diff --git a/src/main/kotlin/io/appwrite/enums/Type.kt b/src/main/kotlin/io/appwrite/enums/Type.kt new file mode 100644 index 00000000..e1b9be4b --- /dev/null +++ b/src/main/kotlin/io/appwrite/enums/Type.kt @@ -0,0 +1,12 @@ +package io.appwrite.enums + +import com.google.gson.annotations.SerializedName + +enum class Type(val value: String) { + @SerializedName("tablesdb") + TABLESDB("tablesdb"), + @SerializedName("legacy") + LEGACY("legacy"); + + override fun toString() = value +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/BucketList.kt b/src/main/kotlin/io/appwrite/models/BucketList.kt index 91e331ff..58cce610 100644 --- a/src/main/kotlin/io/appwrite/models/BucketList.kt +++ b/src/main/kotlin/io/appwrite/models/BucketList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class BucketList( /** - * Total number of buckets documents that matched your query. + * Total number of buckets rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/CollectionList.kt b/src/main/kotlin/io/appwrite/models/CollectionList.kt index b171ae8d..6cd040a5 100644 --- a/src/main/kotlin/io/appwrite/models/CollectionList.kt +++ b/src/main/kotlin/io/appwrite/models/CollectionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class CollectionList( /** - * Total number of collections documents that matched your query. + * Total number of collections rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt b/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt new file mode 100644 index 00000000..fc5c45e4 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt @@ -0,0 +1,94 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnBoolean + */ +data class ColumnBoolean( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Default value for attribute when not provided. Cannot be set when attribute is required. + */ + @SerializedName("default") + var default: Boolean?, + +) { + fun toMap(): Map = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnBoolean( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + default = map["default"] as? Boolean?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt b/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt new file mode 100644 index 00000000..3c5c446b --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt @@ -0,0 +1,102 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnDatetime + */ +data class ColumnDatetime( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * ISO 8601 format. + */ + @SerializedName("format") + val format: String, + + /** + * Default value for attribute when not provided. Only null is optional + */ + @SerializedName("default") + var default: String?, + +) { + fun toMap(): Map = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "format" to format as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnDatetime( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + format = map["format"] as String, + default = map["default"] as? String?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnEmail.kt b/src/main/kotlin/io/appwrite/models/ColumnEmail.kt new file mode 100644 index 00000000..43c9cf25 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnEmail.kt @@ -0,0 +1,102 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnEmail + */ +data class ColumnEmail( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * String format. + */ + @SerializedName("format") + val format: String, + + /** + * Default value for attribute when not provided. Cannot be set when attribute is required. + */ + @SerializedName("default") + var default: String?, + +) { + fun toMap(): Map = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "format" to format as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnEmail( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + format = map["format"] as String, + default = map["default"] as? String?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnEnum.kt b/src/main/kotlin/io/appwrite/models/ColumnEnum.kt new file mode 100644 index 00000000..717316b7 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnEnum.kt @@ -0,0 +1,110 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnEnum + */ +data class ColumnEnum( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Array of elements in enumerated type. + */ + @SerializedName("elements") + val elements: List, + + /** + * String format. + */ + @SerializedName("format") + val format: String, + + /** + * Default value for attribute when not provided. Cannot be set when attribute is required. + */ + @SerializedName("default") + var default: String?, + +) { + fun toMap(): Map = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "elements" to elements as Any, + "format" to format as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnEnum( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + elements = map["elements"] as List, + format = map["format"] as String, + default = map["default"] as? String?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnFloat.kt b/src/main/kotlin/io/appwrite/models/ColumnFloat.kt new file mode 100644 index 00000000..92b7a2fb --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnFloat.kt @@ -0,0 +1,110 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnFloat + */ +data class ColumnFloat( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Minimum value to enforce for new documents. + */ + @SerializedName("min") + var min: Double?, + + /** + * Maximum value to enforce for new documents. + */ + @SerializedName("max") + var max: Double?, + + /** + * Default value for attribute when not provided. Cannot be set when attribute is required. + */ + @SerializedName("default") + var default: Double?, + +) { + fun toMap(): Map = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "min" to min as Any, + "max" to max as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnFloat( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + min = (map["min"] as? Number)?.toDouble(), + max = (map["max"] as? Number)?.toDouble(), + default = (map["default"] as? Number)?.toDouble(), + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnIndex.kt b/src/main/kotlin/io/appwrite/models/ColumnIndex.kt new file mode 100644 index 00000000..617fbeec --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnIndex.kt @@ -0,0 +1,102 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Index + */ +data class ColumnIndex( + /** + * Index ID. + */ + @SerializedName("\$id") + val id: String, + + /** + * Index creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Index update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Index Key. + */ + @SerializedName("key") + val key: String, + + /** + * Index type. + */ + @SerializedName("type") + val type: String, + + /** + * Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an index. + */ + @SerializedName("error") + val error: String, + + /** + * Index columns. + */ + @SerializedName("columns") + val columns: List, + + /** + * Index columns length. + */ + @SerializedName("lengths") + val lengths: List, + + /** + * Index orders. + */ + @SerializedName("orders") + var orders: List?, + +) { + fun toMap(): Map = mapOf( + "\$id" to id as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "columns" to columns as Any, + "lengths" to lengths as Any, + "orders" to orders as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnIndex( + id = map["\$id"] as String, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + columns = map["columns"] as List, + lengths = map["lengths"] as List, + orders = map["orders"] as? List?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt b/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt new file mode 100644 index 00000000..fc877a9d --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt @@ -0,0 +1,38 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Column Indexes List + */ +data class ColumnIndexList( + /** + * Total number of indexes rows that matched your query. + */ + @SerializedName("total") + val total: Long, + + /** + * List of indexes. + */ + @SerializedName("indexes") + val indexes: List, + +) { + fun toMap(): Map = mapOf( + "total" to total as Any, + "indexes" to indexes.map { it.toMap() } as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnIndexList( + total = (map["total"] as Number).toLong(), + indexes = (map["indexes"] as List>).map { ColumnIndex.from(map = it) }, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnInteger.kt b/src/main/kotlin/io/appwrite/models/ColumnInteger.kt new file mode 100644 index 00000000..0545ec5d --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnInteger.kt @@ -0,0 +1,110 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnInteger + */ +data class ColumnInteger( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Minimum value to enforce for new documents. + */ + @SerializedName("min") + var min: Long?, + + /** + * Maximum value to enforce for new documents. + */ + @SerializedName("max") + var max: Long?, + + /** + * Default value for attribute when not provided. Cannot be set when attribute is required. + */ + @SerializedName("default") + var default: Long?, + +) { + fun toMap(): Map = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "min" to min as Any, + "max" to max as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnInteger( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + min = (map["min"] as? Number)?.toLong(), + max = (map["max"] as? Number)?.toLong(), + default = (map["default"] as? Number)?.toLong(), + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnIp.kt b/src/main/kotlin/io/appwrite/models/ColumnIp.kt new file mode 100644 index 00000000..dad7442e --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnIp.kt @@ -0,0 +1,102 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnIP + */ +data class ColumnIp( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * String format. + */ + @SerializedName("format") + val format: String, + + /** + * Default value for attribute when not provided. Cannot be set when attribute is required. + */ + @SerializedName("default") + var default: String?, + +) { + fun toMap(): Map = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "format" to format as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnIp( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + format = map["format"] as String, + default = map["default"] as? String?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnList.kt b/src/main/kotlin/io/appwrite/models/ColumnList.kt new file mode 100644 index 00000000..06e8bd48 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnList.kt @@ -0,0 +1,38 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Columns List + */ +data class ColumnList( + /** + * Total number of columns in the given table. + */ + @SerializedName("total") + val total: Long, + + /** + * List of columns. + */ + @SerializedName("columns") + val columns: List, + +) { + fun toMap(): Map = mapOf( + "total" to total as Any, + "columns" to columns as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnList( + total = (map["total"] as Number).toLong(), + columns = map["columns"] as List, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnRelationship.kt b/src/main/kotlin/io/appwrite/models/ColumnRelationship.kt new file mode 100644 index 00000000..5524b42d --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnRelationship.kt @@ -0,0 +1,134 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnRelationship + */ +data class ColumnRelationship( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * The ID of the related table. + */ + @SerializedName("relatedTable") + val relatedTable: String, + + /** + * The type of the relationship. + */ + @SerializedName("relationType") + val relationType: String, + + /** + * Is the relationship two-way? + */ + @SerializedName("twoWay") + val twoWay: Boolean, + + /** + * The key of the two-way relationship. + */ + @SerializedName("twoWayKey") + val twoWayKey: String, + + /** + * How deleting the parent document will propagate to child documents. + */ + @SerializedName("onDelete") + val onDelete: String, + + /** + * Whether this is the parent or child side of the relationship + */ + @SerializedName("side") + val side: String, + +) { + fun toMap(): Map = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "relatedTable" to relatedTable as Any, + "relationType" to relationType as Any, + "twoWay" to twoWay as Any, + "twoWayKey" to twoWayKey as Any, + "onDelete" to onDelete as Any, + "side" to side as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnRelationship( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + relatedTable = map["relatedTable"] as String, + relationType = map["relationType"] as String, + twoWay = map["twoWay"] as Boolean, + twoWayKey = map["twoWayKey"] as String, + onDelete = map["onDelete"] as String, + side = map["side"] as String, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnString.kt b/src/main/kotlin/io/appwrite/models/ColumnString.kt new file mode 100644 index 00000000..773a8ce8 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnString.kt @@ -0,0 +1,110 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnString + */ +data class ColumnString( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Column size. + */ + @SerializedName("size") + val size: Long, + + /** + * Default value for column when not provided. Cannot be set when column is required. + */ + @SerializedName("default") + var default: String?, + + /** + * Defines whether this column is encrypted or not. + */ + @SerializedName("encrypt") + var encrypt: Boolean?, + +) { + fun toMap(): Map = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "size" to size as Any, + "default" to default as Any, + "encrypt" to encrypt as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnString( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + size = (map["size"] as Number).toLong(), + default = map["default"] as? String?, + encrypt = map["encrypt"] as? Boolean?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnUrl.kt b/src/main/kotlin/io/appwrite/models/ColumnUrl.kt new file mode 100644 index 00000000..10cd5d90 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnUrl.kt @@ -0,0 +1,102 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnURL + */ +data class ColumnUrl( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * String format. + */ + @SerializedName("format") + val format: String, + + /** + * Default value for column when not provided. Cannot be set when column is required. + */ + @SerializedName("default") + var default: String?, + +) { + fun toMap(): Map = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "format" to format as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = ColumnUrl( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + format = map["format"] as String, + default = map["default"] as? String?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ContinentList.kt b/src/main/kotlin/io/appwrite/models/ContinentList.kt index fdd490a3..a6ec3103 100644 --- a/src/main/kotlin/io/appwrite/models/ContinentList.kt +++ b/src/main/kotlin/io/appwrite/models/ContinentList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ContinentList( /** - * Total number of continents documents that matched your query. + * Total number of continents rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/CountryList.kt b/src/main/kotlin/io/appwrite/models/CountryList.kt index 350a8940..546cf739 100644 --- a/src/main/kotlin/io/appwrite/models/CountryList.kt +++ b/src/main/kotlin/io/appwrite/models/CountryList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class CountryList( /** - * Total number of countries documents that matched your query. + * Total number of countries rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/CurrencyList.kt b/src/main/kotlin/io/appwrite/models/CurrencyList.kt index fe1e0013..95dec926 100644 --- a/src/main/kotlin/io/appwrite/models/CurrencyList.kt +++ b/src/main/kotlin/io/appwrite/models/CurrencyList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class CurrencyList( /** - * Total number of currencies documents that matched your query. + * Total number of currencies rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/Database.kt b/src/main/kotlin/io/appwrite/models/Database.kt index 76ccdd9e..8788a836 100644 --- a/src/main/kotlin/io/appwrite/models/Database.kt +++ b/src/main/kotlin/io/appwrite/models/Database.kt @@ -37,6 +37,12 @@ data class Database( @SerializedName("enabled") val enabled: Boolean, + /** + * Database type. + */ + @SerializedName("type") + val type: String, + ) { fun toMap(): Map = mapOf( "\$id" to id as Any, @@ -44,6 +50,7 @@ data class Database( "\$createdAt" to createdAt as Any, "\$updatedAt" to updatedAt as Any, "enabled" to enabled as Any, + "type" to type as Any, ) companion object { @@ -57,6 +64,7 @@ data class Database( createdAt = map["\$createdAt"] as String, updatedAt = map["\$updatedAt"] as String, enabled = map["enabled"] as Boolean, + type = map["type"] as String, ) } } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/DatabaseList.kt b/src/main/kotlin/io/appwrite/models/DatabaseList.kt index 81c91aa7..3b98e298 100644 --- a/src/main/kotlin/io/appwrite/models/DatabaseList.kt +++ b/src/main/kotlin/io/appwrite/models/DatabaseList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class DatabaseList( /** - * Total number of databases documents that matched your query. + * Total number of databases rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/DeploymentList.kt b/src/main/kotlin/io/appwrite/models/DeploymentList.kt index 2b7cf647..3bc6f49e 100644 --- a/src/main/kotlin/io/appwrite/models/DeploymentList.kt +++ b/src/main/kotlin/io/appwrite/models/DeploymentList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class DeploymentList( /** - * Total number of deployments documents that matched your query. + * Total number of deployments rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/DocumentList.kt b/src/main/kotlin/io/appwrite/models/DocumentList.kt index fa3dd202..6f405791 100644 --- a/src/main/kotlin/io/appwrite/models/DocumentList.kt +++ b/src/main/kotlin/io/appwrite/models/DocumentList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class DocumentList( /** - * Total number of documents documents that matched your query. + * Total number of documents rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ExecutionList.kt b/src/main/kotlin/io/appwrite/models/ExecutionList.kt index 322aeee7..ac11e4fb 100644 --- a/src/main/kotlin/io/appwrite/models/ExecutionList.kt +++ b/src/main/kotlin/io/appwrite/models/ExecutionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ExecutionList( /** - * Total number of executions documents that matched your query. + * Total number of executions rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/FileList.kt b/src/main/kotlin/io/appwrite/models/FileList.kt index 5af18f1f..ba69ea8c 100644 --- a/src/main/kotlin/io/appwrite/models/FileList.kt +++ b/src/main/kotlin/io/appwrite/models/FileList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class FileList( /** - * Total number of files documents that matched your query. + * Total number of files rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/FrameworkList.kt b/src/main/kotlin/io/appwrite/models/FrameworkList.kt index 41532c8c..243bc0f5 100644 --- a/src/main/kotlin/io/appwrite/models/FrameworkList.kt +++ b/src/main/kotlin/io/appwrite/models/FrameworkList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class FrameworkList( /** - * Total number of frameworks documents that matched your query. + * Total number of frameworks rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/FunctionList.kt b/src/main/kotlin/io/appwrite/models/FunctionList.kt index 6aaa86a1..7ffe820f 100644 --- a/src/main/kotlin/io/appwrite/models/FunctionList.kt +++ b/src/main/kotlin/io/appwrite/models/FunctionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class FunctionList( /** - * Total number of functions documents that matched your query. + * Total number of functions rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/IdentityList.kt b/src/main/kotlin/io/appwrite/models/IdentityList.kt index 1cbb07d7..2e1a33a2 100644 --- a/src/main/kotlin/io/appwrite/models/IdentityList.kt +++ b/src/main/kotlin/io/appwrite/models/IdentityList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class IdentityList( /** - * Total number of identities documents that matched your query. + * Total number of identities rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/Index.kt b/src/main/kotlin/io/appwrite/models/Index.kt index a368c133..93fe6dfa 100644 --- a/src/main/kotlin/io/appwrite/models/Index.kt +++ b/src/main/kotlin/io/appwrite/models/Index.kt @@ -8,7 +8,25 @@ import io.appwrite.extensions.jsonCast */ data class Index( /** - * Index Key. + * Index ID. + */ + @SerializedName("\$id") + val id: String, + + /** + * Index creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Index update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Index key. */ @SerializedName("key") val key: String, @@ -49,20 +67,11 @@ data class Index( @SerializedName("orders") var orders: List?, - /** - * Index creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Index update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - ) { fun toMap(): Map = mapOf( + "\$id" to id as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, "key" to key as Any, "type" to type as Any, "status" to status as Any, @@ -70,8 +79,6 @@ data class Index( "attributes" to attributes as Any, "lengths" to lengths as Any, "orders" to orders as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, ) companion object { @@ -80,6 +87,9 @@ data class Index( fun from( map: Map, ) = Index( + id = map["\$id"] as String, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, key = map["key"] as String, type = map["type"] as String, status = map["status"] as String, @@ -87,8 +97,6 @@ data class Index( attributes = map["attributes"] as List, lengths = map["lengths"] as List, orders = map["orders"] as? List?, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, ) } } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/IndexList.kt b/src/main/kotlin/io/appwrite/models/IndexList.kt index a14167db..1c2120a3 100644 --- a/src/main/kotlin/io/appwrite/models/IndexList.kt +++ b/src/main/kotlin/io/appwrite/models/IndexList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class IndexList( /** - * Total number of indexes documents that matched your query. + * Total number of indexes rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/LanguageList.kt b/src/main/kotlin/io/appwrite/models/LanguageList.kt index 07559b92..ab78452c 100644 --- a/src/main/kotlin/io/appwrite/models/LanguageList.kt +++ b/src/main/kotlin/io/appwrite/models/LanguageList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class LanguageList( /** - * Total number of languages documents that matched your query. + * Total number of languages rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt b/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt index 3973a031..6f473330 100644 --- a/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt +++ b/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class LocaleCodeList( /** - * Total number of localeCodes documents that matched your query. + * Total number of localeCodes rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/LogList.kt b/src/main/kotlin/io/appwrite/models/LogList.kt index b9f381c9..d2e0b009 100644 --- a/src/main/kotlin/io/appwrite/models/LogList.kt +++ b/src/main/kotlin/io/appwrite/models/LogList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class LogList( /** - * Total number of logs documents that matched your query. + * Total number of logs rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/MembershipList.kt b/src/main/kotlin/io/appwrite/models/MembershipList.kt index 7feaaaaf..efcffc47 100644 --- a/src/main/kotlin/io/appwrite/models/MembershipList.kt +++ b/src/main/kotlin/io/appwrite/models/MembershipList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class MembershipList( /** - * Total number of memberships documents that matched your query. + * Total number of memberships rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/MessageList.kt b/src/main/kotlin/io/appwrite/models/MessageList.kt index 85e4a1bf..1926541c 100644 --- a/src/main/kotlin/io/appwrite/models/MessageList.kt +++ b/src/main/kotlin/io/appwrite/models/MessageList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class MessageList( /** - * Total number of messages documents that matched your query. + * Total number of messages rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/PhoneList.kt b/src/main/kotlin/io/appwrite/models/PhoneList.kt index b17de4fa..675295f6 100644 --- a/src/main/kotlin/io/appwrite/models/PhoneList.kt +++ b/src/main/kotlin/io/appwrite/models/PhoneList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class PhoneList( /** - * Total number of phones documents that matched your query. + * Total number of phones rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ProviderList.kt b/src/main/kotlin/io/appwrite/models/ProviderList.kt index 113ba67f..42231243 100644 --- a/src/main/kotlin/io/appwrite/models/ProviderList.kt +++ b/src/main/kotlin/io/appwrite/models/ProviderList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ProviderList( /** - * Total number of providers documents that matched your query. + * Total number of providers rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt b/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt index bb9e6d79..aaf22f86 100644 --- a/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt +++ b/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ResourceTokenList( /** - * Total number of tokens documents that matched your query. + * Total number of tokens rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/Row.kt b/src/main/kotlin/io/appwrite/models/Row.kt new file mode 100644 index 00000000..bb5c14ff --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/Row.kt @@ -0,0 +1,105 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Row + */ +data class Row( + /** + * Row ID. + */ + @SerializedName("\$id") + val id: String, + + /** + * Row automatically incrementing ID. + */ + @SerializedName("\$sequence") + val sequence: Long, + + /** + * Table ID. + */ + @SerializedName("\$tableId") + val tableId: String, + + /** + * Database ID. + */ + @SerializedName("\$databaseId") + val databaseId: String, + + /** + * Row creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Row update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Row permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + */ + @SerializedName("\$permissions") + val permissions: List, + + /** + * Additional properties + */ + @SerializedName("data") + val data: T +) { + fun toMap(): Map = mapOf( + "\$id" to id as Any, + "\$sequence" to sequence as Any, + "\$tableId" to tableId as Any, + "\$databaseId" to databaseId as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "\$permissions" to permissions as Any, + "data" to data!!.jsonCast(to = Map::class.java) + ) + + companion object { + operator fun invoke( + id: String, + sequence: Long, + tableId: String, + databaseId: String, + createdAt: String, + updatedAt: String, + permissions: List, + data: Map + ) = Row>( + id, + sequence, + tableId, + databaseId, + createdAt, + updatedAt, + permissions, + data + ) + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + nestedType: Class + ) = Row( + id = map["\$id"] as String, + sequence = (map["\$sequence"] as Number).toLong(), + tableId = map["\$tableId"] as String, + databaseId = map["\$databaseId"] as String, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + permissions = map["\$permissions"] as List, + data = map.jsonCast(to = nestedType) + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/RowList.kt b/src/main/kotlin/io/appwrite/models/RowList.kt new file mode 100644 index 00000000..289f39b7 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/RowList.kt @@ -0,0 +1,46 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Rows List + */ +data class RowList( + /** + * Total number of rows rows that matched your query. + */ + @SerializedName("total") + val total: Long, + + /** + * List of rows. + */ + @SerializedName("rows") + val rows: List>, + +) { + fun toMap(): Map = mapOf( + "total" to total as Any, + "rows" to rows.map { it.toMap() } as Any, + ) + + companion object { + operator fun invoke( + total: Long, + rows: List>>, + ) = RowList>( + total, + rows, + ) + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + nestedType: Class + ) = RowList( + total = (map["total"] as Number).toLong(), + rows = (map["rows"] as List>).map { Row.from(map = it, nestedType) }, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/RuntimeList.kt b/src/main/kotlin/io/appwrite/models/RuntimeList.kt index d08e9a2c..55c17d97 100644 --- a/src/main/kotlin/io/appwrite/models/RuntimeList.kt +++ b/src/main/kotlin/io/appwrite/models/RuntimeList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class RuntimeList( /** - * Total number of runtimes documents that matched your query. + * Total number of runtimes rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SessionList.kt b/src/main/kotlin/io/appwrite/models/SessionList.kt index c7080e6f..13e0c36f 100644 --- a/src/main/kotlin/io/appwrite/models/SessionList.kt +++ b/src/main/kotlin/io/appwrite/models/SessionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SessionList( /** - * Total number of sessions documents that matched your query. + * Total number of sessions rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SiteList.kt b/src/main/kotlin/io/appwrite/models/SiteList.kt index 15ecc7f5..53325710 100644 --- a/src/main/kotlin/io/appwrite/models/SiteList.kt +++ b/src/main/kotlin/io/appwrite/models/SiteList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SiteList( /** - * Total number of sites documents that matched your query. + * Total number of sites rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SpecificationList.kt b/src/main/kotlin/io/appwrite/models/SpecificationList.kt index f5045777..5ac8cf95 100644 --- a/src/main/kotlin/io/appwrite/models/SpecificationList.kt +++ b/src/main/kotlin/io/appwrite/models/SpecificationList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SpecificationList( /** - * Total number of specifications documents that matched your query. + * Total number of specifications rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SubscriberList.kt b/src/main/kotlin/io/appwrite/models/SubscriberList.kt index 87181a3e..8f811c7d 100644 --- a/src/main/kotlin/io/appwrite/models/SubscriberList.kt +++ b/src/main/kotlin/io/appwrite/models/SubscriberList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SubscriberList( /** - * Total number of subscribers documents that matched your query. + * Total number of subscribers rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/Table.kt b/src/main/kotlin/io/appwrite/models/Table.kt new file mode 100644 index 00000000..9b43c414 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/Table.kt @@ -0,0 +1,102 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Table + */ +data class Table( + /** + * Table ID. + */ + @SerializedName("\$id") + val id: String, + + /** + * Table creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Table update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Table permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + */ + @SerializedName("\$permissions") + val permissions: List, + + /** + * Database ID. + */ + @SerializedName("databaseId") + val databaseId: String, + + /** + * Table name. + */ + @SerializedName("name") + val name: String, + + /** + * Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys. + */ + @SerializedName("enabled") + val enabled: Boolean, + + /** + * Whether row-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions). + */ + @SerializedName("rowSecurity") + val rowSecurity: Boolean, + + /** + * Table columns. + */ + @SerializedName("columns") + val columns: List, + + /** + * Table indexes. + */ + @SerializedName("indexes") + val indexes: List, + +) { + fun toMap(): Map = mapOf( + "\$id" to id as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "\$permissions" to permissions as Any, + "databaseId" to databaseId as Any, + "name" to name as Any, + "enabled" to enabled as Any, + "rowSecurity" to rowSecurity as Any, + "columns" to columns as Any, + "indexes" to indexes.map { it.toMap() } as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = Table( + id = map["\$id"] as String, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + permissions = map["\$permissions"] as List, + databaseId = map["databaseId"] as String, + name = map["name"] as String, + enabled = map["enabled"] as Boolean, + rowSecurity = map["rowSecurity"] as Boolean, + columns = map["columns"] as List, + indexes = (map["indexes"] as List>).map { ColumnIndex.from(map = it) }, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/TableList.kt b/src/main/kotlin/io/appwrite/models/TableList.kt new file mode 100644 index 00000000..3ee5afb6 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/TableList.kt @@ -0,0 +1,38 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Tables List + */ +data class TableList( + /** + * Total number of tables rows that matched your query. + */ + @SerializedName("total") + val total: Long, + + /** + * List of tables. + */ + @SerializedName("tables") + val tables: List, + +) { + fun toMap(): Map = mapOf( + "total" to total as Any, + "tables" to tables.map { it.toMap() } as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map, + ) = TableList( + total = (map["total"] as Number).toLong(), + tables = (map["tables"] as List>).map { Table.from(map = it) }, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/TargetList.kt b/src/main/kotlin/io/appwrite/models/TargetList.kt index 01470c80..8b94727d 100644 --- a/src/main/kotlin/io/appwrite/models/TargetList.kt +++ b/src/main/kotlin/io/appwrite/models/TargetList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TargetList( /** - * Total number of targets documents that matched your query. + * Total number of targets rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/TeamList.kt b/src/main/kotlin/io/appwrite/models/TeamList.kt index 17ccd6bb..f1a19688 100644 --- a/src/main/kotlin/io/appwrite/models/TeamList.kt +++ b/src/main/kotlin/io/appwrite/models/TeamList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TeamList( /** - * Total number of teams documents that matched your query. + * Total number of teams rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/TopicList.kt b/src/main/kotlin/io/appwrite/models/TopicList.kt index 7173fecc..2a1cc5f6 100644 --- a/src/main/kotlin/io/appwrite/models/TopicList.kt +++ b/src/main/kotlin/io/appwrite/models/TopicList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TopicList( /** - * Total number of topics documents that matched your query. + * Total number of topics rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/UserList.kt b/src/main/kotlin/io/appwrite/models/UserList.kt index efe164fc..3bf322e6 100644 --- a/src/main/kotlin/io/appwrite/models/UserList.kt +++ b/src/main/kotlin/io/appwrite/models/UserList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class UserList( /** - * Total number of users documents that matched your query. + * Total number of users rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/VariableList.kt b/src/main/kotlin/io/appwrite/models/VariableList.kt index 06004c6e..3f7e4306 100644 --- a/src/main/kotlin/io/appwrite/models/VariableList.kt +++ b/src/main/kotlin/io/appwrite/models/VariableList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class VariableList( /** - * Total number of variables documents that matched your query. + * Total number of variables rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/services/Account.kt b/src/main/kotlin/io/appwrite/services/Account.kt index 26494eba..dcfe70d2 100644 --- a/src/main/kotlin/io/appwrite/services/Account.kt +++ b/src/main/kotlin/io/appwrite/services/Account.kt @@ -1046,6 +1046,9 @@ class Account(client: Client) : Service(client) { * @param secret Valid verification token. * @return [io.appwrite.models.Session] */ + @Deprecated( + message = "This API has been deprecated." + ) @Throws(AppwriteException::class) suspend fun updateMagicURLSession( userId: String, @@ -1080,6 +1083,9 @@ class Account(client: Client) : Service(client) { * @param secret Valid verification token. * @return [io.appwrite.models.Session] */ + @Deprecated( + message = "This API has been deprecated." + ) @Throws(AppwriteException::class) suspend fun updatePhoneSession( userId: String, diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index 6c57edea..28322972 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -20,6 +20,11 @@ class Databases(client: Client) : Service(client) { * @param search Search term to filter your list results. Max length: 256 chars. * @return [io.appwrite.models.DatabaseList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.list` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.list"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun list( @@ -53,14 +58,21 @@ class Databases(client: Client) : Service(client) { * @param databaseId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param name Database name. Max length: 128 chars. * @param enabled Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. + * @param type Database type. * @return [io.appwrite.models.Database] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createDatabase` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createDatabase"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun create( databaseId: String, name: String, enabled: Boolean? = null, + type: io.appwrite.enums.Type? = null, ): io.appwrite.models.Database { val apiPath = "/databases" @@ -68,6 +80,7 @@ class Databases(client: Client) : Service(client) { "databaseId" to databaseId, "name" to name, "enabled" to enabled, + "type" to type, ) val apiHeaders = mutableMapOf( "content-type" to "application/json", @@ -91,6 +104,11 @@ class Databases(client: Client) : Service(client) { * @param databaseId Database ID. * @return [io.appwrite.models.Database] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.get` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.get"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun get( databaseId: String, @@ -123,6 +141,11 @@ class Databases(client: Client) : Service(client) { * @param enabled Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. * @return [io.appwrite.models.Database] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.update` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.update"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun update( @@ -159,6 +182,11 @@ class Databases(client: Client) : Service(client) { * @param databaseId Database ID. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.delete` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.delete"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun delete( databaseId: String, @@ -188,6 +216,11 @@ class Databases(client: Client) : Service(client) { * @param search Search term to filter your list results. Max length: 256 chars. * @return [io.appwrite.models.CollectionList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.listTables` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.listTables"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listCollections( @@ -228,6 +261,11 @@ class Databases(client: Client) : Service(client) { * @param enabled Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled. * @return [io.appwrite.models.Collection] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createTable` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createTable"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createCollection( @@ -271,6 +309,11 @@ class Databases(client: Client) : Service(client) { * @param collectionId Collection ID. * @return [io.appwrite.models.Collection] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.getTable` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.getTable"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun getCollection( databaseId: String, @@ -308,6 +351,11 @@ class Databases(client: Client) : Service(client) { * @param enabled Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled. * @return [io.appwrite.models.Collection] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateTable` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateTable"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateCollection( @@ -351,6 +399,11 @@ class Databases(client: Client) : Service(client) { * @param collectionId Collection ID. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.deleteTable` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.deleteTable"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun deleteCollection( databaseId: String, @@ -378,10 +431,15 @@ class Databases(client: Client) : Service(client) { * List attributes in the collection. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error * @return [io.appwrite.models.AttributeList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.listColumns` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.listColumns"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listAttributes( @@ -415,13 +473,18 @@ class Databases(client: Client) : Service(client) { * Create a boolean attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeBoolean] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createBooleanColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createBooleanColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createBooleanAttribute( @@ -462,13 +525,18 @@ class Databases(client: Client) : Service(client) { * Update a boolean attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param newKey New attribute key. * @return [io.appwrite.models.AttributeBoolean] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateBooleanColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateBooleanColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateBooleanAttribute( @@ -509,13 +577,18 @@ class Databases(client: Client) : Service(client) { * Create a date time attribute according to the ISO 8601 standard. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeDatetime] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createDatetimeColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createDatetimeColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createDatetimeAttribute( @@ -556,13 +629,18 @@ class Databases(client: Client) : Service(client) { * Update a date time attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param newKey New attribute key. * @return [io.appwrite.models.AttributeDatetime] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateDatetimeColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateDatetimeColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateDatetimeAttribute( @@ -603,13 +681,18 @@ class Databases(client: Client) : Service(client) { * Create an email attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeEmail] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createEmailColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createEmailColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createEmailAttribute( @@ -650,13 +733,18 @@ class Databases(client: Client) : Service(client) { * Update an email attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param newKey New attribute key. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeEmail] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateEmailColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateEmailColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateEmailAttribute( @@ -694,17 +782,22 @@ class Databases(client: Client) : Service(client) { } /** - * Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. + * Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. - * @param elements Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long. + * @param elements Array of enum values. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeEnum] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createEnumColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createEnumColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createEnumAttribute( @@ -747,14 +840,19 @@ class Databases(client: Client) : Service(client) { * Update an enum attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. - * @param elements Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long. + * @param elements Updated list of enum values. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param newKey New attribute key. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeEnum] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateEnumColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateEnumColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateEnumAttribute( @@ -797,15 +895,20 @@ class Databases(client: Client) : Service(client) { * Create a float attribute. Optionally, minimum and maximum values can be provided. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? - * @param min Minimum value to enforce on new documents - * @param max Maximum value to enforce on new documents - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. + * @param min Minimum value. + * @param max Maximum value. + * @param default Default value. Cannot be set when required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeFloat] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createFloatColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createFloatColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createFloatAttribute( @@ -850,15 +953,20 @@ class Databases(client: Client) : Service(client) { * Update a float attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param min Minimum value to enforce on new documents - * @param max Maximum value to enforce on new documents - * @param newKey New attribute key. + * @param default Default value. Cannot be set when required. + * @param min Minimum value. + * @param max Maximum value. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeFloat] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateFloatColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateFloatColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateFloatAttribute( @@ -903,15 +1011,20 @@ class Databases(client: Client) : Service(client) { * Create an integer attribute. Optionally, minimum and maximum values can be provided. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? - * @param min Minimum value to enforce on new documents - * @param max Maximum value to enforce on new documents - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. + * @param min Minimum value + * @param max Maximum value + * @param default Default value. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeInteger] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createIntegerColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createIntegerColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createIntegerAttribute( @@ -956,15 +1069,20 @@ class Databases(client: Client) : Service(client) { * Update an integer attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param min Minimum value to enforce on new documents - * @param max Maximum value to enforce on new documents - * @param newKey New attribute key. + * @param default Default value. Cannot be set when attribute is required. + * @param min Minimum value + * @param max Maximum value + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeInteger] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateIntegerColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateIntegerColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateIntegerAttribute( @@ -1009,13 +1127,18 @@ class Databases(client: Client) : Service(client) { * Create IP address attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. + * @param default Default value. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeIp] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createIpColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createIpColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createIpAttribute( @@ -1056,13 +1179,18 @@ class Databases(client: Client) : Service(client) { * Update an ip attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param newKey New attribute key. + * @param default Default value. Cannot be set when attribute is required. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeIp] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateIpColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateIpColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateIpAttribute( @@ -1103,8 +1231,8 @@ class Databases(client: Client) : Service(client) { * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). - * @param relatedCollectionId Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. + * @param relatedCollectionId Related Collection ID. * @param type Relation type * @param twoWay Is Two Way? * @param key Attribute Key. @@ -1112,6 +1240,11 @@ class Databases(client: Client) : Service(client) { * @param onDelete Constraints option * @return [io.appwrite.models.AttributeRelationship] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createRelationshipColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createRelationshipColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createRelationshipAttribute( @@ -1156,7 +1289,7 @@ class Databases(client: Client) : Service(client) { * Create a string attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param size Attribute size for text attributes, in number of characters. * @param required Is attribute required? @@ -1165,6 +1298,11 @@ class Databases(client: Client) : Service(client) { * @param encrypt Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. * @return [io.appwrite.models.AttributeString] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createStringColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createStringColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createStringAttribute( @@ -1209,14 +1347,19 @@ class Databases(client: Client) : Service(client) { * Update a string attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param size Maximum size of the string attribute. - * @param newKey New attribute key. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeString] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateStringColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateStringColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateStringAttribute( @@ -1259,13 +1402,18 @@ class Databases(client: Client) : Service(client) { * Create a URL attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeUrl] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createUrlColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createUrlColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createUrlAttribute( @@ -1306,13 +1454,18 @@ class Databases(client: Client) : Service(client) { * Update an url attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param newKey New attribute key. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeUrl] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateUrlColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateUrlColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateUrlAttribute( @@ -1353,10 +1506,15 @@ class Databases(client: Client) : Service(client) { * Get attribute by ID. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.getColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.getColumn"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun getAttribute( databaseId: String, @@ -1385,10 +1543,15 @@ class Databases(client: Client) : Service(client) { * Deletes an attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.deleteColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.deleteColumn"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun deleteAttribute( databaseId: String, @@ -1418,12 +1581,17 @@ class Databases(client: Client) : Service(client) { * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param onDelete Constraints option - * @param newKey New attribute key. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeRelationship] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateRelationshipColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateRelationshipColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateRelationshipAttribute( @@ -1466,6 +1634,11 @@ class Databases(client: Client) : Service(client) { * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.DocumentList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.listRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.listRows"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listDocuments( @@ -1504,6 +1677,11 @@ class Databases(client: Client) : Service(client) { * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.DocumentList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.listRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.listRows"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listDocuments( @@ -1527,6 +1705,11 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createDocument( @@ -1572,6 +1755,11 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createDocument( @@ -1590,13 +1778,18 @@ class Databases(client: Client) : Service(client) { ) /** - * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. * @param documents Array of documents data as JSON objects. * @return [io.appwrite.models.DocumentList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createRows"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun createDocuments( databaseId: String, @@ -1628,13 +1821,18 @@ class Databases(client: Client) : Service(client) { } /** - * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. * @param documents Array of documents data as JSON objects. * @return [io.appwrite.models.DocumentList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createRows"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun createDocuments( databaseId: String, @@ -1648,13 +1846,18 @@ class Databases(client: Client) : Service(client) { ) /** - * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. * @param collectionId Collection ID. * @param documents Array of document data as JSON objects. May contain partial documents. * @return [io.appwrite.models.DocumentList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.upsertRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.upsertRows"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun upsertDocuments( databaseId: String, @@ -1686,13 +1889,18 @@ class Databases(client: Client) : Service(client) { } /** - * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. * @param collectionId Collection ID. * @param documents Array of document data as JSON objects. May contain partial documents. * @return [io.appwrite.models.DocumentList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.upsertRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.upsertRows"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun upsertDocuments( databaseId: String, @@ -1706,7 +1914,7 @@ class Databases(client: Client) : Service(client) { ) /** - * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. + * Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1714,6 +1922,11 @@ class Databases(client: Client) : Service(client) { * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.DocumentList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateRows"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateDocuments( @@ -1748,7 +1961,7 @@ class Databases(client: Client) : Service(client) { } /** - * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. + * Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1756,6 +1969,11 @@ class Databases(client: Client) : Service(client) { * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.DocumentList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateRows"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateDocuments( @@ -1772,13 +1990,18 @@ class Databases(client: Client) : Service(client) { ) /** - * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Bulk delete documents using queries, if no queries are passed then all documents are deleted. + * Bulk delete documents using queries, if no queries are passed then all documents are deleted. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.DocumentList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.deleteRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.deleteRows"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun deleteDocuments( @@ -1811,13 +2034,18 @@ class Databases(client: Client) : Service(client) { } /** - * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Bulk delete documents using queries, if no queries are passed then all documents are deleted. + * Bulk delete documents using queries, if no queries are passed then all documents are deleted. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.DocumentList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.deleteRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.deleteRows"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun deleteDocuments( @@ -1840,6 +2068,11 @@ class Databases(client: Client) : Service(client) { * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.Document] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.getRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.getRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun getDocument( @@ -1881,6 +2114,11 @@ class Databases(client: Client) : Service(client) { * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.Document] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.getRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.getRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun getDocument( @@ -1897,7 +2135,7 @@ class Databases(client: Client) : Service(client) { ) /** - * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1906,6 +2144,11 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.upsertRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.upsertRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun upsertDocument( @@ -1942,7 +2185,7 @@ class Databases(client: Client) : Service(client) { } /** - * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1951,6 +2194,11 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.upsertRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.upsertRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun upsertDocument( @@ -1978,6 +2226,11 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateDocument( @@ -2023,6 +2276,11 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateDocument( @@ -2048,6 +2306,11 @@ class Databases(client: Client) : Service(client) { * @param documentId Document ID. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.deleteRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.deleteRow"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun deleteDocument( databaseId: String, @@ -2080,10 +2343,15 @@ class Databases(client: Client) : Service(client) { * @param collectionId Collection ID. * @param documentId Document ID. * @param attribute Attribute key. - * @param value Value to decrement the attribute by. The value must be a number. + * @param value Value to increment the attribute by. The value must be a number. * @param min Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown. * @return [io.appwrite.models.Document] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.decrementRowColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.decrementRowColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun decrementDocumentAttribute( @@ -2128,10 +2396,15 @@ class Databases(client: Client) : Service(client) { * @param collectionId Collection ID. * @param documentId Document ID. * @param attribute Attribute key. - * @param value Value to decrement the attribute by. The value must be a number. + * @param value Value to increment the attribute by. The value must be a number. * @param min Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown. * @return [io.appwrite.models.Document] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.decrementRowColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.decrementRowColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun decrementDocumentAttribute( @@ -2162,6 +2435,11 @@ class Databases(client: Client) : Service(client) { * @param max Maximum value for the attribute. If the current value is greater than this value, an error will be thrown. * @return [io.appwrite.models.Document] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.incrementRowColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.incrementRowColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun incrementDocumentAttribute( @@ -2210,6 +2488,11 @@ class Databases(client: Client) : Service(client) { * @param max Maximum value for the attribute. If the current value is greater than this value, an error will be thrown. * @return [io.appwrite.models.Document] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.incrementRowColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.incrementRowColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun incrementDocumentAttribute( @@ -2237,6 +2520,11 @@ class Databases(client: Client) : Service(client) { * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error * @return [io.appwrite.models.IndexList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.listIndexes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.listIndexes"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listIndexes( @@ -2278,6 +2566,11 @@ class Databases(client: Client) : Service(client) { * @param lengths Length of index. Maximum of 100 * @return [io.appwrite.models.Index] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createIndex` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createIndex"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createIndex( @@ -2324,6 +2617,11 @@ class Databases(client: Client) : Service(client) { * @param key Index Key. * @return [io.appwrite.models.Index] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.getIndex` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.getIndex"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun getIndex( databaseId: String, @@ -2360,6 +2658,11 @@ class Databases(client: Client) : Service(client) { * @param key Index Key. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `TablesDb.deleteIndex` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDb.deleteIndex"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun deleteIndex( databaseId: String, diff --git a/src/main/kotlin/io/appwrite/services/TablesDb.kt b/src/main/kotlin/io/appwrite/services/TablesDb.kt new file mode 100644 index 00000000..ba10c076 --- /dev/null +++ b/src/main/kotlin/io/appwrite/services/TablesDb.kt @@ -0,0 +1,2391 @@ +package io.appwrite.services + +import io.appwrite.Client +import io.appwrite.models.* +import io.appwrite.enums.* +import io.appwrite.exceptions.AppwriteException +import io.appwrite.extensions.classOf +import okhttp3.Cookie +import java.io.File + +/** + * +**/ +class TablesDb(client: Client) : Service(client) { + + /** + * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. + * + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name + * @param search Search term to filter your list results. Max length: 256 chars. + * @return [io.appwrite.models.DatabaseList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun list( + queries: List? = null, + search: String? = null, + ): io.appwrite.models.DatabaseList { + val apiPath = "/tablesdb" + + val apiParams = mutableMapOf( + "queries" to queries, + "search" to search, + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.DatabaseList = { + io.appwrite.models.DatabaseList.from(map = it as Map) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.DatabaseList::class.java, + converter, + ) + } + + /** + * Create a new Database. + * + * @param databaseId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param name Database name. Max length: 128 chars. + * @param enabled Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. + * @param type Database type. + * @return [io.appwrite.models.Database] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun create( + databaseId: String, + name: String, + enabled: Boolean? = null, + type: io.appwrite.enums.Type? = null, + ): io.appwrite.models.Database { + val apiPath = "/tablesdb" + + val apiParams = mutableMapOf( + "databaseId" to databaseId, + "name" to name, + "enabled" to enabled, + "type" to type, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Database = { + io.appwrite.models.Database.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Database::class.java, + converter, + ) + } + + /** + * Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata. + * + * @param databaseId Database ID. + * @return [io.appwrite.models.Database] + */ + @Throws(AppwriteException::class) + suspend fun get( + databaseId: String, + ): io.appwrite.models.Database { + val apiPath = "/tablesdb/{databaseId}" + .replace("{databaseId}", databaseId) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.Database = { + io.appwrite.models.Database.from(map = it as Map) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Database::class.java, + converter, + ) + } + + /** + * Update a database by its unique ID. + * + * @param databaseId Database ID. + * @param name Database name. Max length: 128 chars. + * @param enabled Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. + * @return [io.appwrite.models.Database] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun update( + databaseId: String, + name: String, + enabled: Boolean? = null, + ): io.appwrite.models.Database { + val apiPath = "/tablesdb/{databaseId}" + .replace("{databaseId}", databaseId) + + val apiParams = mutableMapOf( + "name" to name, + "enabled" to enabled, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Database = { + io.appwrite.models.Database.from(map = it as Map) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Database::class.java, + converter, + ) + } + + /** + * Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database. + * + * @param databaseId Database ID. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun delete( + databaseId: String, + ): Any { + val apiPath = "/tablesdb/{databaseId}" + .replace("{databaseId}", databaseId) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results. + * + * @param databaseId Database ID. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity + * @param search Search term to filter your list results. Max length: 256 chars. + * @return [io.appwrite.models.TableList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun listTables( + databaseId: String, + queries: List? = null, + search: String? = null, + ): io.appwrite.models.TableList { + val apiPath = "/tablesdb/{databaseId}/tables" + .replace("{databaseId}", databaseId) + + val apiParams = mutableMapOf( + "queries" to queries, + "search" to search, + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.TableList = { + io.appwrite.models.TableList.from(map = it as Map) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.TableList::class.java, + converter, + ) + } + + /** + * Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param name Table name. Max length: 128 chars. + * @param permissions An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param rowSecurity Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param enabled Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. + * @return [io.appwrite.models.Table] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createTable( + databaseId: String, + tableId: String, + name: String, + permissions: List? = null, + rowSecurity: Boolean? = null, + enabled: Boolean? = null, + ): io.appwrite.models.Table { + val apiPath = "/tablesdb/{databaseId}/tables" + .replace("{databaseId}", databaseId) + + val apiParams = mutableMapOf( + "tableId" to tableId, + "name" to name, + "permissions" to permissions, + "rowSecurity" to rowSecurity, + "enabled" to enabled, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Table = { + io.appwrite.models.Table.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Table::class.java, + converter, + ) + } + + /** + * Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @return [io.appwrite.models.Table] + */ + @Throws(AppwriteException::class) + suspend fun getTable( + databaseId: String, + tableId: String, + ): io.appwrite.models.Table { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.Table = { + io.appwrite.models.Table.from(map = it as Map) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Table::class.java, + converter, + ) + } + + /** + * Update a table by its unique ID. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param name Table name. Max length: 128 chars. + * @param permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param rowSecurity Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param enabled Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. + * @return [io.appwrite.models.Table] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateTable( + databaseId: String, + tableId: String, + name: String, + permissions: List? = null, + rowSecurity: Boolean? = null, + enabled: Boolean? = null, + ): io.appwrite.models.Table { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "name" to name, + "permissions" to permissions, + "rowSecurity" to rowSecurity, + "enabled" to enabled, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Table = { + io.appwrite.models.Table.from(map = it as Map) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Table::class.java, + converter, + ) + } + + /** + * Delete a table by its unique ID. Only users with write permissions have access to delete this resource. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun deleteTable( + databaseId: String, + tableId: String, + ): Any { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * List columns in the table. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error + * @return [io.appwrite.models.ColumnList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun listColumns( + databaseId: String, + tableId: String, + queries: List? = null, + ): io.appwrite.models.ColumnList { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "queries" to queries, + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.ColumnList = { + io.appwrite.models.ColumnList.from(map = it as Map) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnList::class.java, + converter, + ) + } + + /** + * Create a boolean column. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnBoolean] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createBooleanColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: Boolean? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnBoolean { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/boolean" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "key" to key, + "required" to required, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnBoolean = { + io.appwrite.models.ColumnBoolean.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnBoolean::class.java, + converter, + ) + } + + /** + * Update a boolean column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnBoolean] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateBooleanColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: Boolean? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnBoolean { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + "required" to required, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnBoolean = { + io.appwrite.models.ColumnBoolean.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnBoolean::class.java, + converter, + ) + } + + /** + * Create a date time column according to the ISO 8601 standard. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnDatetime] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createDatetimeColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnDatetime { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/datetime" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "key" to key, + "required" to required, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnDatetime = { + io.appwrite.models.ColumnDatetime.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnDatetime::class.java, + converter, + ) + } + + /** + * Update a date time column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnDatetime] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateDatetimeColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnDatetime { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + "required" to required, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnDatetime = { + io.appwrite.models.ColumnDatetime.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnDatetime::class.java, + converter, + ) + } + + /** + * Create an email column. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnEmail] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createEmailColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnEmail { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/email" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "key" to key, + "required" to required, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnEmail = { + io.appwrite.models.ColumnEmail.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnEmail::class.java, + converter, + ) + } + + /** + * Update an email column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnEmail] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateEmailColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnEmail { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + "required" to required, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnEmail = { + io.appwrite.models.ColumnEmail.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnEmail::class.java, + converter, + ) + } + + /** + * Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param elements Array of enum values. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnEnum] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createEnumColumn( + databaseId: String, + tableId: String, + key: String, + elements: List, + required: Boolean, + default: String? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnEnum { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/enum" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "key" to key, + "elements" to elements, + "required" to required, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnEnum = { + io.appwrite.models.ColumnEnum.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnEnum::class.java, + converter, + ) + } + + /** + * Update an enum column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param elements Updated list of enum values. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnEnum] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateEnumColumn( + databaseId: String, + tableId: String, + key: String, + elements: List, + required: Boolean, + default: String? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnEnum { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + "elements" to elements, + "required" to required, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnEnum = { + io.appwrite.models.ColumnEnum.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnEnum::class.java, + converter, + ) + } + + /** + * Create a float column. Optionally, minimum and maximum values can be provided. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param min Minimum value + * @param max Maximum value + * @param default Default value. Cannot be set when required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnFloat] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createFloatColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + min: Double? = null, + max: Double? = null, + default: Double? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnFloat { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/float" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "key" to key, + "required" to required, + "min" to min, + "max" to max, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnFloat = { + io.appwrite.models.ColumnFloat.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnFloat::class.java, + converter, + ) + } + + /** + * Update a float column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value. Cannot be set when required. + * @param min Minimum value + * @param max Maximum value + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnFloat] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateFloatColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: Double? = null, + min: Double? = null, + max: Double? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnFloat { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + "required" to required, + "min" to min, + "max" to max, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnFloat = { + io.appwrite.models.ColumnFloat.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnFloat::class.java, + converter, + ) + } + + /** + * Create an integer column. Optionally, minimum and maximum values can be provided. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param min Minimum value + * @param max Maximum value + * @param default Default value. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnInteger] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createIntegerColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + min: Long? = null, + max: Long? = null, + default: Long? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnInteger { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/integer" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "key" to key, + "required" to required, + "min" to min, + "max" to max, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnInteger = { + io.appwrite.models.ColumnInteger.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnInteger::class.java, + converter, + ) + } + + /** + * Update an integer column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value. Cannot be set when column is required. + * @param min Minimum value + * @param max Maximum value + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnInteger] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateIntegerColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: Long? = null, + min: Long? = null, + max: Long? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnInteger { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + "required" to required, + "min" to min, + "max" to max, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnInteger = { + io.appwrite.models.ColumnInteger.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnInteger::class.java, + converter, + ) + } + + /** + * Create IP address column. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnIp] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createIpColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnIp { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/ip" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "key" to key, + "required" to required, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnIp = { + io.appwrite.models.ColumnIp.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnIp::class.java, + converter, + ) + } + + /** + * Update an ip column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value. Cannot be set when column is required. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnIp] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateIpColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnIp { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + "required" to required, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnIp = { + io.appwrite.models.ColumnIp.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnIp::class.java, + converter, + ) + } + + /** + * Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param relatedTableId Related Table ID. + * @param type Relation type + * @param twoWay Is Two Way? + * @param key Column Key. + * @param twoWayKey Two Way Column Key. + * @param onDelete Constraints option + * @return [io.appwrite.models.ColumnRelationship] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createRelationshipColumn( + databaseId: String, + tableId: String, + relatedTableId: String, + type: io.appwrite.enums.RelationshipType, + twoWay: Boolean? = null, + key: String? = null, + twoWayKey: String? = null, + onDelete: io.appwrite.enums.RelationMutate? = null, + ): io.appwrite.models.ColumnRelationship { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/relationship" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "relatedTableId" to relatedTableId, + "type" to type, + "twoWay" to twoWay, + "key" to key, + "twoWayKey" to twoWayKey, + "onDelete" to onDelete, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnRelationship = { + io.appwrite.models.ColumnRelationship.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnRelationship::class.java, + converter, + ) + } + + /** + * Create a string column. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Column Key. + * @param size Attribute size for text attributes, in number of characters. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param array Is column an array? + * @param encrypt Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @return [io.appwrite.models.ColumnString] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createStringColumn( + databaseId: String, + tableId: String, + key: String, + size: Long, + required: Boolean, + default: String? = null, + array: Boolean? = null, + encrypt: Boolean? = null, + ): io.appwrite.models.ColumnString { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "key" to key, + "size" to size, + "required" to required, + "default" to default, + "array" to array, + "encrypt" to encrypt, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnString = { + io.appwrite.models.ColumnString.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnString::class.java, + converter, + ) + } + + /** + * Update a string column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param size Maximum size of the string column. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnString] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateStringColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + size: Long? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnString { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + "required" to required, + "default" to default, + "size" to size, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnString = { + io.appwrite.models.ColumnString.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnString::class.java, + converter, + ) + } + + /** + * Create a URL column. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnUrl] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createUrlColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnUrl { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "key" to key, + "required" to required, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnUrl = { + io.appwrite.models.ColumnUrl.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnUrl::class.java, + converter, + ) + } + + /** + * Update an url column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnUrl] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateUrlColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnUrl { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + "required" to required, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnUrl = { + io.appwrite.models.ColumnUrl.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnUrl::class.java, + converter, + ) + } + + /** + * Get column by ID. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun getColumn( + databaseId: String, + tableId: String, + key: String, + ): Any { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + ) + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * Deletes a column. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun deleteColumn( + databaseId: String, + tableId: String, + key: String, + ): Any { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param onDelete Constraints option + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnRelationship] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateRelationshipColumn( + databaseId: String, + tableId: String, + key: String, + onDelete: io.appwrite.enums.RelationMutate? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnRelationship { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/{key}/relationship" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + "onDelete" to onDelete, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnRelationship = { + io.appwrite.models.ColumnRelationship.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnRelationship::class.java, + converter, + ) + } + + /** + * List indexes in the collection. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error + * @return [io.appwrite.models.ColumnIndexList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun listIndexes( + databaseId: String, + tableId: String, + queries: List? = null, + ): io.appwrite.models.ColumnIndexList { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/indexes" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "queries" to queries, + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.ColumnIndexList = { + io.appwrite.models.ColumnIndexList.from(map = it as Map) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnIndexList::class.java, + converter, + ) + } + + /** + * Creates an index on the columns listed. Your index should include all the columns you will query in a single request.Attributes can be `key`, `fulltext`, and `unique`. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Index Key. + * @param type Index type. + * @param columns Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long. + * @param orders Array of index orders. Maximum of 100 orders are allowed. + * @param lengths Length of index. Maximum of 100 + * @return [io.appwrite.models.ColumnIndex] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createIndex( + databaseId: String, + tableId: String, + key: String, + type: io.appwrite.enums.IndexType, + columns: List, + orders: List? = null, + lengths: List? = null, + ): io.appwrite.models.ColumnIndex { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/indexes" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "key" to key, + "type" to type, + "columns" to columns, + "orders" to orders, + "lengths" to lengths, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnIndex = { + io.appwrite.models.ColumnIndex.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnIndex::class.java, + converter, + ) + } + + /** + * Get index by ID. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Index Key. + * @return [io.appwrite.models.ColumnIndex] + */ + @Throws(AppwriteException::class) + suspend fun getIndex( + databaseId: String, + tableId: String, + key: String, + ): io.appwrite.models.ColumnIndex { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.ColumnIndex = { + io.appwrite.models.ColumnIndex.from(map = it as Map) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnIndex::class.java, + converter, + ) + } + + /** + * Delete an index. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Index Key. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun deleteIndex( + databaseId: String, + tableId: String, + key: String, + ): Any { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * Get a list of all the user's rows in a given table. You can use the query params to filter your results. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @return [io.appwrite.models.RowList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun listRows( + databaseId: String, + tableId: String, + queries: List? = null, + nestedType: Class, + ): io.appwrite.models.RowList { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "queries" to queries, + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.RowList = { + io.appwrite.models.RowList.from(map = it as Map, nestedType) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Get a list of all the user's rows in a given table. You can use the query params to filter your results. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @return [io.appwrite.models.RowList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun listRows( + databaseId: String, + tableId: String, + queries: List? = null, + ): io.appwrite.models.RowList> = listRows( + databaseId, + tableId, + queries, + nestedType = classOf(), + ) + + /** + * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. + * @param rowId Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param data Row data as JSON object. + * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @return [io.appwrite.models.Row] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createRow( + databaseId: String, + tableId: String, + rowId: String, + data: Any, + permissions: List? = null, + nestedType: Class, + ): io.appwrite.models.Row { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "rowId" to rowId, + "data" to data, + "permissions" to permissions, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Row = { + io.appwrite.models.Row.from(map = it as Map, nestedType) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. + * @param rowId Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param data Row data as JSON object. + * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @return [io.appwrite.models.Row] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createRow( + databaseId: String, + tableId: String, + rowId: String, + data: Any, + permissions: List? = null, + ): io.appwrite.models.Row> = createRow( + databaseId, + tableId, + rowId, + data, + permissions, + nestedType = classOf(), + ) + + /** + * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. + * @param rows Array of documents data as JSON objects. + * @return [io.appwrite.models.RowList] + */ + @Throws(AppwriteException::class) + suspend fun createRows( + databaseId: String, + tableId: String, + rows: List, + nestedType: Class, + ): io.appwrite.models.RowList { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "rows" to rows, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.RowList = { + io.appwrite.models.RowList.from(map = it as Map, nestedType) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. + * @param rows Array of documents data as JSON objects. + * @return [io.appwrite.models.RowList] + */ + @Throws(AppwriteException::class) + suspend fun createRows( + databaseId: String, + tableId: String, + rows: List, + ): io.appwrite.models.RowList> = createRows( + databaseId, + tableId, + rows, + nestedType = classOf(), + ) + + /** + * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rows Array of row data as JSON objects. May contain partial rows. + * @return [io.appwrite.models.RowList] + */ + @Throws(AppwriteException::class) + suspend fun upsertRows( + databaseId: String, + tableId: String, + rows: List, + nestedType: Class, + ): io.appwrite.models.RowList { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "rows" to rows, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.RowList = { + io.appwrite.models.RowList.from(map = it as Map, nestedType) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rows Array of row data as JSON objects. May contain partial rows. + * @return [io.appwrite.models.RowList] + */ + @Throws(AppwriteException::class) + suspend fun upsertRows( + databaseId: String, + tableId: String, + rows: List, + ): io.appwrite.models.RowList> = upsertRows( + databaseId, + tableId, + rows, + nestedType = classOf(), + ) + + /** + * Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param data Row data as JSON object. Include only column and value pairs to be updated. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @return [io.appwrite.models.RowList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateRows( + databaseId: String, + tableId: String, + data: Any? = null, + queries: List? = null, + nestedType: Class, + ): io.appwrite.models.RowList { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "data" to data, + "queries" to queries, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.RowList = { + io.appwrite.models.RowList.from(map = it as Map, nestedType) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param data Row data as JSON object. Include only column and value pairs to be updated. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @return [io.appwrite.models.RowList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateRows( + databaseId: String, + tableId: String, + data: Any? = null, + queries: List? = null, + ): io.appwrite.models.RowList> = updateRows( + databaseId, + tableId, + data, + queries, + nestedType = classOf(), + ) + + /** + * Bulk delete rows using queries, if no queries are passed then all rows are deleted. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @return [io.appwrite.models.RowList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun deleteRows( + databaseId: String, + tableId: String, + queries: List? = null, + nestedType: Class, + ): io.appwrite.models.RowList { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf( + "queries" to queries, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.RowList = { + io.appwrite.models.RowList.from(map = it as Map, nestedType) + } + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Bulk delete rows using queries, if no queries are passed then all rows are deleted. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @return [io.appwrite.models.RowList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun deleteRows( + databaseId: String, + tableId: String, + queries: List? = null, + ): io.appwrite.models.RowList> = deleteRows( + databaseId, + tableId, + queries, + nestedType = classOf(), + ) + + /** + * Get a row by its unique ID. This endpoint response returns a JSON object with the row data. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param rowId Row ID. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @return [io.appwrite.models.Row] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun getRow( + databaseId: String, + tableId: String, + rowId: String, + queries: List? = null, + nestedType: Class, + ): io.appwrite.models.Row { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{rowId}", rowId) + + val apiParams = mutableMapOf( + "queries" to queries, + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.Row = { + io.appwrite.models.Row.from(map = it as Map, nestedType) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Get a row by its unique ID. This endpoint response returns a JSON object with the row data. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param rowId Row ID. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @return [io.appwrite.models.Row] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun getRow( + databaseId: String, + tableId: String, + rowId: String, + queries: List? = null, + ): io.appwrite.models.Row> = getRow( + databaseId, + tableId, + rowId, + queries, + nestedType = classOf(), + ) + + /** + * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param data Row data as JSON object. Include all required columns of the row to be created or updated. + * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @return [io.appwrite.models.Row] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun upsertRow( + databaseId: String, + tableId: String, + rowId: String, + data: Any? = null, + permissions: List? = null, + nestedType: Class, + ): io.appwrite.models.Row { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{rowId}", rowId) + + val apiParams = mutableMapOf( + "data" to data, + "permissions" to permissions, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Row = { + io.appwrite.models.Row.from(map = it as Map, nestedType) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param data Row data as JSON object. Include all required columns of the row to be created or updated. + * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @return [io.appwrite.models.Row] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun upsertRow( + databaseId: String, + tableId: String, + rowId: String, + data: Any? = null, + permissions: List? = null, + ): io.appwrite.models.Row> = upsertRow( + databaseId, + tableId, + rowId, + data, + permissions, + nestedType = classOf(), + ) + + /** + * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param data Row data as JSON object. Include only columns and value pairs to be updated. + * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @return [io.appwrite.models.Row] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateRow( + databaseId: String, + tableId: String, + rowId: String, + data: Any? = null, + permissions: List? = null, + nestedType: Class, + ): io.appwrite.models.Row { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{rowId}", rowId) + + val apiParams = mutableMapOf( + "data" to data, + "permissions" to permissions, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Row = { + io.appwrite.models.Row.from(map = it as Map, nestedType) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param data Row data as JSON object. Include only columns and value pairs to be updated. + * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @return [io.appwrite.models.Row] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateRow( + databaseId: String, + tableId: String, + rowId: String, + data: Any? = null, + permissions: List? = null, + ): io.appwrite.models.Row> = updateRow( + databaseId, + tableId, + rowId, + data, + permissions, + nestedType = classOf(), + ) + + /** + * Delete a row by its unique ID. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param rowId Row ID. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun deleteRow( + databaseId: String, + tableId: String, + rowId: String, + ): Any { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{rowId}", rowId) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * Decrement a specific column of a row by a given value. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param column Column key. + * @param value Value to increment the column by. The value must be a number. + * @param min Minimum value for the column. If the current value is lesser than this value, an exception will be thrown. + * @return [io.appwrite.models.Row] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun decrementRowColumn( + databaseId: String, + tableId: String, + rowId: String, + column: String, + value: Double? = null, + min: Double? = null, + nestedType: Class, + ): io.appwrite.models.Row { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{rowId}", rowId) + .replace("{column}", column) + + val apiParams = mutableMapOf( + "value" to value, + "min" to min, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Row = { + io.appwrite.models.Row.from(map = it as Map, nestedType) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Decrement a specific column of a row by a given value. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param column Column key. + * @param value Value to increment the column by. The value must be a number. + * @param min Minimum value for the column. If the current value is lesser than this value, an exception will be thrown. + * @return [io.appwrite.models.Row] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun decrementRowColumn( + databaseId: String, + tableId: String, + rowId: String, + column: String, + value: Double? = null, + min: Double? = null, + ): io.appwrite.models.Row> = decrementRowColumn( + databaseId, + tableId, + rowId, + column, + value, + min, + nestedType = classOf(), + ) + + /** + * Increment a specific column of a row by a given value. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param column Column key. + * @param value Value to increment the column by. The value must be a number. + * @param max Maximum value for the column. If the current value is greater than this value, an error will be thrown. + * @return [io.appwrite.models.Row] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun incrementRowColumn( + databaseId: String, + tableId: String, + rowId: String, + column: String, + value: Double? = null, + max: Double? = null, + nestedType: Class, + ): io.appwrite.models.Row { + val apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{rowId}", rowId) + .replace("{column}", column) + + val apiParams = mutableMapOf( + "value" to value, + "max" to max, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Row = { + io.appwrite.models.Row.from(map = it as Map, nestedType) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Increment a specific column of a row by a given value. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param column Column key. + * @param value Value to increment the column by. The value must be a number. + * @param max Maximum value for the column. If the current value is greater than this value, an error will be thrown. + * @return [io.appwrite.models.Row] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun incrementRowColumn( + databaseId: String, + tableId: String, + rowId: String, + column: String, + value: Double? = null, + max: Double? = null, + ): io.appwrite.models.Row> = incrementRowColumn( + databaseId, + tableId, + rowId, + column, + value, + max, + nestedType = classOf(), + ) + +} \ No newline at end of file From d8b3a84b6b0aff6d31967c362edd70b85b26e089 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 20 Aug 2025 18:26:27 +1200 Subject: [PATCH 2/7] Add 1.8.x support --- docs/examples/java/databases/create.md | 1 - docs/examples/java/tablesdb/create.md | 1 - docs/examples/kotlin/databases/create.md | 3 +-- docs/examples/kotlin/tablesdb/create.md | 3 +-- src/main/kotlin/io/appwrite/enums/Type.kt | 12 ------------ src/main/kotlin/io/appwrite/services/Databases.kt | 3 --- src/main/kotlin/io/appwrite/services/TablesDb.kt | 7 ++----- 7 files changed, 4 insertions(+), 26 deletions(-) delete mode 100644 src/main/kotlin/io/appwrite/enums/Type.kt diff --git a/docs/examples/java/databases/create.md b/docs/examples/java/databases/create.md index 6db46550..31cd37e1 100644 --- a/docs/examples/java/databases/create.md +++ b/docs/examples/java/databases/create.md @@ -13,7 +13,6 @@ databases.create( "", // databaseId "", // name false, // enabled (optional) - .TABLESDB, // type (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tablesdb/create.md b/docs/examples/java/tablesdb/create.md index 446e89d9..76fac7a8 100644 --- a/docs/examples/java/tablesdb/create.md +++ b/docs/examples/java/tablesdb/create.md @@ -13,7 +13,6 @@ tablesDb.create( "", // databaseId "", // name false, // enabled (optional) - .TABLESDB, // type (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/kotlin/databases/create.md b/docs/examples/kotlin/databases/create.md index ef53fe36..04c64801 100644 --- a/docs/examples/kotlin/databases/create.md +++ b/docs/examples/kotlin/databases/create.md @@ -12,6 +12,5 @@ val databases = Databases(client) val response = databases.create( databaseId = "", name = "", - enabled = false, // optional - type = "tablesdb" // optional + enabled = false // optional ) diff --git a/docs/examples/kotlin/tablesdb/create.md b/docs/examples/kotlin/tablesdb/create.md index e95e1fab..b8b58aae 100644 --- a/docs/examples/kotlin/tablesdb/create.md +++ b/docs/examples/kotlin/tablesdb/create.md @@ -12,6 +12,5 @@ val tablesDb = TablesDb(client) val response = tablesDb.create( databaseId = "", name = "", - enabled = false, // optional - type = "tablesdb" // optional + enabled = false // optional ) diff --git a/src/main/kotlin/io/appwrite/enums/Type.kt b/src/main/kotlin/io/appwrite/enums/Type.kt deleted file mode 100644 index e1b9be4b..00000000 --- a/src/main/kotlin/io/appwrite/enums/Type.kt +++ /dev/null @@ -1,12 +0,0 @@ -package io.appwrite.enums - -import com.google.gson.annotations.SerializedName - -enum class Type(val value: String) { - @SerializedName("tablesdb") - TABLESDB("tablesdb"), - @SerializedName("legacy") - LEGACY("legacy"); - - override fun toString() = value -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index 28322972..d7ff76c2 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -58,7 +58,6 @@ class Databases(client: Client) : Service(client) { * @param databaseId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param name Database name. Max length: 128 chars. * @param enabled Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. - * @param type Database type. * @return [io.appwrite.models.Database] */ @Deprecated( @@ -72,7 +71,6 @@ class Databases(client: Client) : Service(client) { databaseId: String, name: String, enabled: Boolean? = null, - type: io.appwrite.enums.Type? = null, ): io.appwrite.models.Database { val apiPath = "/databases" @@ -80,7 +78,6 @@ class Databases(client: Client) : Service(client) { "databaseId" to databaseId, "name" to name, "enabled" to enabled, - "type" to type, ) val apiHeaders = mutableMapOf( "content-type" to "application/json", diff --git a/src/main/kotlin/io/appwrite/services/TablesDb.kt b/src/main/kotlin/io/appwrite/services/TablesDb.kt index ba10c076..6f0d25b2 100644 --- a/src/main/kotlin/io/appwrite/services/TablesDb.kt +++ b/src/main/kotlin/io/appwrite/services/TablesDb.kt @@ -53,7 +53,6 @@ class TablesDb(client: Client) : Service(client) { * @param databaseId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param name Database name. Max length: 128 chars. * @param enabled Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. - * @param type Database type. * @return [io.appwrite.models.Database] */ @JvmOverloads @@ -62,7 +61,6 @@ class TablesDb(client: Client) : Service(client) { databaseId: String, name: String, enabled: Boolean? = null, - type: io.appwrite.enums.Type? = null, ): io.appwrite.models.Database { val apiPath = "/tablesdb" @@ -70,7 +68,6 @@ class TablesDb(client: Client) : Service(client) { "databaseId" to databaseId, "name" to name, "enabled" to enabled, - "type" to type, ) val apiHeaders = mutableMapOf( "content-type" to "application/json", @@ -1462,7 +1459,7 @@ class TablesDb(client: Client) : Service(client) { } /** - * List indexes in the collection. + * List indexes on the table. * * @param databaseId Database ID. * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). @@ -1499,7 +1496,7 @@ class TablesDb(client: Client) : Service(client) { } /** - * Creates an index on the columns listed. Your index should include all the columns you will query in a single request.Attributes can be `key`, `fulltext`, and `unique`. + * Creates an index on the columns listed. Your index should include all the columns you will query in a single request.Type can be `key`, `fulltext`, or `unique`. * * @param databaseId Database ID. * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). From 969136aaab0ebc5645b509f69b6407841b83be48 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 20 Aug 2025 19:21:08 +1200 Subject: [PATCH 3/7] Add 1.8.x support --- docs/examples/java/databases/decrement-document-attribute.md | 2 +- docs/examples/java/databases/increment-document-attribute.md | 2 +- docs/examples/java/tablesdb/decrement-row-column.md | 2 +- docs/examples/java/tablesdb/increment-row-column.md | 2 +- docs/examples/kotlin/databases/decrement-document-attribute.md | 2 +- docs/examples/kotlin/databases/increment-document-attribute.md | 2 +- docs/examples/kotlin/tablesdb/decrement-row-column.md | 2 +- docs/examples/kotlin/tablesdb/increment-row-column.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/examples/java/databases/decrement-document-attribute.md b/docs/examples/java/databases/decrement-document-attribute.md index 34b74726..a44cc512 100644 --- a/docs/examples/java/databases/decrement-document-attribute.md +++ b/docs/examples/java/databases/decrement-document-attribute.md @@ -5,7 +5,7 @@ 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 + .setSession(""); // The user session to authenticate with Databases databases = new Databases(client); diff --git a/docs/examples/java/databases/increment-document-attribute.md b/docs/examples/java/databases/increment-document-attribute.md index ca9c357f..b5b5054e 100644 --- a/docs/examples/java/databases/increment-document-attribute.md +++ b/docs/examples/java/databases/increment-document-attribute.md @@ -5,7 +5,7 @@ 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 + .setSession(""); // The user session to authenticate with Databases databases = new Databases(client); diff --git a/docs/examples/java/tablesdb/decrement-row-column.md b/docs/examples/java/tablesdb/decrement-row-column.md index 82fbddff..9d75b65a 100644 --- a/docs/examples/java/tablesdb/decrement-row-column.md +++ b/docs/examples/java/tablesdb/decrement-row-column.md @@ -5,7 +5,7 @@ import io.appwrite.services.TablesDb; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setKey(""); // Your secret API key + .setSession(""); // The user session to authenticate with TablesDb tablesDb = new TablesDb(client); diff --git a/docs/examples/java/tablesdb/increment-row-column.md b/docs/examples/java/tablesdb/increment-row-column.md index 4ad5954f..0f3cc089 100644 --- a/docs/examples/java/tablesdb/increment-row-column.md +++ b/docs/examples/java/tablesdb/increment-row-column.md @@ -5,7 +5,7 @@ import io.appwrite.services.TablesDb; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setKey(""); // Your secret API key + .setSession(""); // The user session to authenticate with TablesDb tablesDb = new TablesDb(client); diff --git a/docs/examples/kotlin/databases/decrement-document-attribute.md b/docs/examples/kotlin/databases/decrement-document-attribute.md index 05204d76..d0226c0b 100644 --- a/docs/examples/kotlin/databases/decrement-document-attribute.md +++ b/docs/examples/kotlin/databases/decrement-document-attribute.md @@ -5,7 +5,7 @@ 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 + .setSession("") // The user session to authenticate with val databases = Databases(client) diff --git a/docs/examples/kotlin/databases/increment-document-attribute.md b/docs/examples/kotlin/databases/increment-document-attribute.md index 40c1224a..b56ed91d 100644 --- a/docs/examples/kotlin/databases/increment-document-attribute.md +++ b/docs/examples/kotlin/databases/increment-document-attribute.md @@ -5,7 +5,7 @@ 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 + .setSession("") // The user session to authenticate with val databases = Databases(client) diff --git a/docs/examples/kotlin/tablesdb/decrement-row-column.md b/docs/examples/kotlin/tablesdb/decrement-row-column.md index 035fcedd..cab810ad 100644 --- a/docs/examples/kotlin/tablesdb/decrement-row-column.md +++ b/docs/examples/kotlin/tablesdb/decrement-row-column.md @@ -5,7 +5,7 @@ import io.appwrite.services.TablesDb val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setKey("") // Your secret API key + .setSession("") // The user session to authenticate with val tablesDb = TablesDb(client) diff --git a/docs/examples/kotlin/tablesdb/increment-row-column.md b/docs/examples/kotlin/tablesdb/increment-row-column.md index cccfde92..44782ddb 100644 --- a/docs/examples/kotlin/tablesdb/increment-row-column.md +++ b/docs/examples/kotlin/tablesdb/increment-row-column.md @@ -5,7 +5,7 @@ import io.appwrite.services.TablesDb val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setKey("") // Your secret API key + .setSession("") // The user session to authenticate with val tablesDb = TablesDb(client) From 77e67e78e7cdb0b61b09d5729149edfb28592dc4 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 21 Aug 2025 22:20:18 +1200 Subject: [PATCH 4/7] Fix casing --- .../account/create-m-f-a-authenticator.md | 24 + .../java/account/create-m-f-a-challenge.md | 23 + .../account/create-m-f-a-recovery-codes.md | 19 + .../account/delete-m-f-a-authenticator.md | 24 + .../java/account/get-m-f-a-recovery-codes.md | 19 + .../java/account/list-m-f-a-factors.md | 19 + .../account/update-m-f-a-authenticator.md | 25 + .../java/account/update-m-f-a-challenge.md | 24 + .../account/update-m-f-a-recovery-codes.md | 19 + .../java/messaging/create-a-p-n-s-provider.md | 30 ++ .../java/messaging/create-f-c-m-provider.md | 26 + docs/examples/java/messaging/create-s-m-s.md | 29 ++ .../java/messaging/create-s-m-t-p-provider.md | 36 ++ .../java/messaging/update-a-p-n-s-provider.md | 30 ++ .../java/messaging/update-f-c-m-provider.md | 26 + docs/examples/java/messaging/update-s-m-s.md | 29 ++ .../java/messaging/update-s-m-t-p-provider.md | 36 ++ .../java/tablesdb/create-boolean-column.md | 6 +- .../java/tablesdb/create-datetime-column.md | 6 +- .../java/tablesdb/create-email-column.md | 6 +- .../java/tablesdb/create-enum-column.md | 6 +- .../java/tablesdb/create-float-column.md | 6 +- docs/examples/java/tablesdb/create-index.md | 6 +- .../java/tablesdb/create-integer-column.md | 6 +- .../java/tablesdb/create-ip-column.md | 6 +- .../tablesdb/create-relationship-column.md | 6 +- docs/examples/java/tablesdb/create-row.md | 6 +- docs/examples/java/tablesdb/create-rows.md | 6 +- .../java/tablesdb/create-string-column.md | 6 +- docs/examples/java/tablesdb/create-table.md | 6 +- .../java/tablesdb/create-url-column.md | 6 +- docs/examples/java/tablesdb/create.md | 6 +- .../java/tablesdb/decrement-row-column.md | 6 +- docs/examples/java/tablesdb/delete-column.md | 6 +- docs/examples/java/tablesdb/delete-index.md | 6 +- docs/examples/java/tablesdb/delete-row.md | 6 +- docs/examples/java/tablesdb/delete-rows.md | 6 +- docs/examples/java/tablesdb/delete-table.md | 6 +- docs/examples/java/tablesdb/delete.md | 6 +- docs/examples/java/tablesdb/get-column.md | 6 +- docs/examples/java/tablesdb/get-index.md | 6 +- docs/examples/java/tablesdb/get-row.md | 6 +- docs/examples/java/tablesdb/get-table.md | 6 +- docs/examples/java/tablesdb/get.md | 6 +- .../java/tablesdb/increment-row-column.md | 6 +- docs/examples/java/tablesdb/list-columns.md | 6 +- docs/examples/java/tablesdb/list-indexes.md | 6 +- docs/examples/java/tablesdb/list-rows.md | 6 +- docs/examples/java/tablesdb/list-tables.md | 6 +- docs/examples/java/tablesdb/list.md | 6 +- .../java/tablesdb/update-boolean-column.md | 6 +- .../java/tablesdb/update-datetime-column.md | 6 +- .../java/tablesdb/update-email-column.md | 6 +- .../java/tablesdb/update-enum-column.md | 6 +- .../java/tablesdb/update-float-column.md | 6 +- .../java/tablesdb/update-integer-column.md | 6 +- .../java/tablesdb/update-ip-column.md | 6 +- .../tablesdb/update-relationship-column.md | 6 +- docs/examples/java/tablesdb/update-row.md | 6 +- docs/examples/java/tablesdb/update-rows.md | 6 +- .../java/tablesdb/update-string-column.md | 6 +- docs/examples/java/tablesdb/update-table.md | 6 +- .../java/tablesdb/update-url-column.md | 6 +- docs/examples/java/tablesdb/update.md | 6 +- docs/examples/java/tablesdb/upsert-row.md | 6 +- docs/examples/java/tablesdb/upsert-rows.md | 6 +- .../java/users/create-m-f-a-recovery-codes.md | 23 + .../java/users/delete-m-f-a-authenticator.md | 25 + .../java/users/get-m-f-a-recovery-codes.md | 23 + .../examples/java/users/list-m-f-a-factors.md | 23 + .../java/users/update-m-f-a-recovery-codes.md | 23 + docs/examples/java/users/update-m-f-a.md | 24 + .../account/create-m-f-a-authenticator.md | 15 + .../kotlin/account/create-m-f-a-challenge.md | 14 + .../account/create-m-f-a-recovery-codes.md | 12 + .../account/delete-m-f-a-authenticator.md | 15 + .../account/get-m-f-a-recovery-codes.md | 12 + .../kotlin/account/list-m-f-a-factors.md | 12 + .../account/update-m-f-a-authenticator.md | 16 + .../kotlin/account/update-m-f-a-challenge.md | 15 + .../account/update-m-f-a-recovery-codes.md | 12 + .../messaging/create-a-p-n-s-provider.md | 21 + .../kotlin/messaging/create-f-c-m-provider.md | 17 + .../examples/kotlin/messaging/create-s-m-s.md | 20 + .../messaging/create-s-m-t-p-provider.md | 27 + .../messaging/update-a-p-n-s-provider.md | 21 + .../kotlin/messaging/update-f-c-m-provider.md | 17 + .../examples/kotlin/messaging/update-s-m-s.md | 20 + .../messaging/update-s-m-t-p-provider.md | 27 + .../kotlin/tablesdb/create-boolean-column.md | 6 +- .../kotlin/tablesdb/create-datetime-column.md | 6 +- .../kotlin/tablesdb/create-email-column.md | 6 +- .../kotlin/tablesdb/create-enum-column.md | 6 +- .../kotlin/tablesdb/create-float-column.md | 6 +- docs/examples/kotlin/tablesdb/create-index.md | 6 +- .../kotlin/tablesdb/create-integer-column.md | 6 +- .../kotlin/tablesdb/create-ip-column.md | 6 +- .../tablesdb/create-relationship-column.md | 6 +- docs/examples/kotlin/tablesdb/create-row.md | 6 +- docs/examples/kotlin/tablesdb/create-rows.md | 6 +- .../kotlin/tablesdb/create-string-column.md | 6 +- docs/examples/kotlin/tablesdb/create-table.md | 6 +- .../kotlin/tablesdb/create-url-column.md | 6 +- docs/examples/kotlin/tablesdb/create.md | 6 +- .../kotlin/tablesdb/decrement-row-column.md | 6 +- .../examples/kotlin/tablesdb/delete-column.md | 6 +- docs/examples/kotlin/tablesdb/delete-index.md | 6 +- docs/examples/kotlin/tablesdb/delete-row.md | 6 +- docs/examples/kotlin/tablesdb/delete-rows.md | 6 +- docs/examples/kotlin/tablesdb/delete-table.md | 6 +- docs/examples/kotlin/tablesdb/delete.md | 6 +- docs/examples/kotlin/tablesdb/get-column.md | 6 +- docs/examples/kotlin/tablesdb/get-index.md | 6 +- docs/examples/kotlin/tablesdb/get-row.md | 6 +- docs/examples/kotlin/tablesdb/get-table.md | 6 +- docs/examples/kotlin/tablesdb/get.md | 6 +- .../kotlin/tablesdb/increment-row-column.md | 6 +- docs/examples/kotlin/tablesdb/list-columns.md | 6 +- docs/examples/kotlin/tablesdb/list-indexes.md | 6 +- docs/examples/kotlin/tablesdb/list-rows.md | 6 +- docs/examples/kotlin/tablesdb/list-tables.md | 6 +- docs/examples/kotlin/tablesdb/list.md | 6 +- .../kotlin/tablesdb/update-boolean-column.md | 6 +- .../kotlin/tablesdb/update-datetime-column.md | 6 +- .../kotlin/tablesdb/update-email-column.md | 6 +- .../kotlin/tablesdb/update-enum-column.md | 6 +- .../kotlin/tablesdb/update-float-column.md | 6 +- .../kotlin/tablesdb/update-integer-column.md | 6 +- .../kotlin/tablesdb/update-ip-column.md | 6 +- .../tablesdb/update-relationship-column.md | 6 +- docs/examples/kotlin/tablesdb/update-row.md | 6 +- docs/examples/kotlin/tablesdb/update-rows.md | 6 +- .../kotlin/tablesdb/update-string-column.md | 6 +- docs/examples/kotlin/tablesdb/update-table.md | 6 +- .../kotlin/tablesdb/update-url-column.md | 6 +- docs/examples/kotlin/tablesdb/update.md | 6 +- docs/examples/kotlin/tablesdb/upsert-row.md | 6 +- docs/examples/kotlin/tablesdb/upsert-rows.md | 6 +- .../users/create-m-f-a-recovery-codes.md | 14 + .../users/delete-m-f-a-authenticator.md | 16 + .../kotlin/users/get-m-f-a-recovery-codes.md | 14 + .../kotlin/users/list-m-f-a-factors.md | 14 + .../users/update-m-f-a-recovery-codes.md | 14 + docs/examples/kotlin/users/update-m-f-a.md | 15 + .../kotlin/io/appwrite/models/BucketList.kt | 2 +- .../io/appwrite/models/CollectionList.kt | 2 +- .../io/appwrite/models/ColumnIndexList.kt | 2 +- .../io/appwrite/models/ContinentList.kt | 2 +- .../kotlin/io/appwrite/models/CountryList.kt | 2 +- .../kotlin/io/appwrite/models/CurrencyList.kt | 2 +- .../kotlin/io/appwrite/models/DatabaseList.kt | 2 +- .../io/appwrite/models/DeploymentList.kt | 2 +- .../kotlin/io/appwrite/models/DocumentList.kt | 2 +- .../io/appwrite/models/ExecutionList.kt | 2 +- .../kotlin/io/appwrite/models/FileList.kt | 2 +- .../io/appwrite/models/FrameworkList.kt | 2 +- .../kotlin/io/appwrite/models/FunctionList.kt | 2 +- .../kotlin/io/appwrite/models/IdentityList.kt | 2 +- .../kotlin/io/appwrite/models/IndexList.kt | 2 +- .../kotlin/io/appwrite/models/LanguageList.kt | 2 +- .../io/appwrite/models/LocaleCodeList.kt | 2 +- src/main/kotlin/io/appwrite/models/LogList.kt | 2 +- .../io/appwrite/models/MembershipList.kt | 2 +- .../kotlin/io/appwrite/models/MessageList.kt | 2 +- .../kotlin/io/appwrite/models/PhoneList.kt | 2 +- .../kotlin/io/appwrite/models/ProviderList.kt | 2 +- .../io/appwrite/models/ResourceTokenList.kt | 2 +- src/main/kotlin/io/appwrite/models/RowList.kt | 2 +- .../kotlin/io/appwrite/models/RuntimeList.kt | 2 +- .../kotlin/io/appwrite/models/SessionList.kt | 2 +- .../kotlin/io/appwrite/models/SiteList.kt | 2 +- .../io/appwrite/models/SpecificationList.kt | 2 +- .../io/appwrite/models/SubscriberList.kt | 2 +- .../kotlin/io/appwrite/models/TableList.kt | 2 +- .../kotlin/io/appwrite/models/TargetList.kt | 2 +- .../kotlin/io/appwrite/models/TeamList.kt | 2 +- .../kotlin/io/appwrite/models/TopicList.kt | 2 +- .../kotlin/io/appwrite/models/UserList.kt | 2 +- .../kotlin/io/appwrite/models/VariableList.kt | 2 +- .../kotlin/io/appwrite/services/Account.kt | 387 +++++++++++++- .../kotlin/io/appwrite/services/Avatars.kt | 32 +- .../kotlin/io/appwrite/services/Databases.kt | 264 +++++----- .../kotlin/io/appwrite/services/Functions.kt | 24 +- .../kotlin/io/appwrite/services/Health.kt | 3 +- .../kotlin/io/appwrite/services/Locale.kt | 6 +- .../kotlin/io/appwrite/services/Messaging.kt | 479 ++++++++++++++++++ src/main/kotlin/io/appwrite/services/Sites.kt | 20 +- .../kotlin/io/appwrite/services/Storage.kt | 13 +- .../kotlin/io/appwrite/services/TablesDb.kt | 81 +-- src/main/kotlin/io/appwrite/services/Teams.kt | 23 +- .../kotlin/io/appwrite/services/Tokens.kt | 2 +- src/main/kotlin/io/appwrite/services/Users.kt | 258 +++++++++- 192 files changed, 2669 insertions(+), 540 deletions(-) create mode 100644 docs/examples/java/account/create-m-f-a-authenticator.md create mode 100644 docs/examples/java/account/create-m-f-a-challenge.md create mode 100644 docs/examples/java/account/create-m-f-a-recovery-codes.md create mode 100644 docs/examples/java/account/delete-m-f-a-authenticator.md create mode 100644 docs/examples/java/account/get-m-f-a-recovery-codes.md create mode 100644 docs/examples/java/account/list-m-f-a-factors.md create mode 100644 docs/examples/java/account/update-m-f-a-authenticator.md create mode 100644 docs/examples/java/account/update-m-f-a-challenge.md create mode 100644 docs/examples/java/account/update-m-f-a-recovery-codes.md create mode 100644 docs/examples/java/messaging/create-a-p-n-s-provider.md create mode 100644 docs/examples/java/messaging/create-f-c-m-provider.md create mode 100644 docs/examples/java/messaging/create-s-m-s.md create mode 100644 docs/examples/java/messaging/create-s-m-t-p-provider.md create mode 100644 docs/examples/java/messaging/update-a-p-n-s-provider.md create mode 100644 docs/examples/java/messaging/update-f-c-m-provider.md create mode 100644 docs/examples/java/messaging/update-s-m-s.md create mode 100644 docs/examples/java/messaging/update-s-m-t-p-provider.md create mode 100644 docs/examples/java/users/create-m-f-a-recovery-codes.md create mode 100644 docs/examples/java/users/delete-m-f-a-authenticator.md create mode 100644 docs/examples/java/users/get-m-f-a-recovery-codes.md create mode 100644 docs/examples/java/users/list-m-f-a-factors.md create mode 100644 docs/examples/java/users/update-m-f-a-recovery-codes.md create mode 100644 docs/examples/java/users/update-m-f-a.md create mode 100644 docs/examples/kotlin/account/create-m-f-a-authenticator.md create mode 100644 docs/examples/kotlin/account/create-m-f-a-challenge.md create mode 100644 docs/examples/kotlin/account/create-m-f-a-recovery-codes.md create mode 100644 docs/examples/kotlin/account/delete-m-f-a-authenticator.md create mode 100644 docs/examples/kotlin/account/get-m-f-a-recovery-codes.md create mode 100644 docs/examples/kotlin/account/list-m-f-a-factors.md create mode 100644 docs/examples/kotlin/account/update-m-f-a-authenticator.md create mode 100644 docs/examples/kotlin/account/update-m-f-a-challenge.md create mode 100644 docs/examples/kotlin/account/update-m-f-a-recovery-codes.md create mode 100644 docs/examples/kotlin/messaging/create-a-p-n-s-provider.md create mode 100644 docs/examples/kotlin/messaging/create-f-c-m-provider.md create mode 100644 docs/examples/kotlin/messaging/create-s-m-s.md create mode 100644 docs/examples/kotlin/messaging/create-s-m-t-p-provider.md create mode 100644 docs/examples/kotlin/messaging/update-a-p-n-s-provider.md create mode 100644 docs/examples/kotlin/messaging/update-f-c-m-provider.md create mode 100644 docs/examples/kotlin/messaging/update-s-m-s.md create mode 100644 docs/examples/kotlin/messaging/update-s-m-t-p-provider.md create mode 100644 docs/examples/kotlin/users/create-m-f-a-recovery-codes.md create mode 100644 docs/examples/kotlin/users/delete-m-f-a-authenticator.md create mode 100644 docs/examples/kotlin/users/get-m-f-a-recovery-codes.md create mode 100644 docs/examples/kotlin/users/list-m-f-a-factors.md create mode 100644 docs/examples/kotlin/users/update-m-f-a-recovery-codes.md create mode 100644 docs/examples/kotlin/users/update-m-f-a.md diff --git a/docs/examples/java/account/create-m-f-a-authenticator.md b/docs/examples/java/account/create-m-f-a-authenticator.md new file mode 100644 index 00000000..d38ddd3b --- /dev/null +++ b/docs/examples/java/account/create-m-f-a-authenticator.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createMFAAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/account/create-m-f-a-challenge.md b/docs/examples/java/account/create-m-f-a-challenge.md new file mode 100644 index 00000000..5c048cba --- /dev/null +++ b/docs/examples/java/account/create-m-f-a-challenge.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticationFactor; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMFAChallenge( + AuthenticationFactor.EMAIL, // factor + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/account/create-m-f-a-recovery-codes.md b/docs/examples/java/account/create-m-f-a-recovery-codes.md new file mode 100644 index 00000000..6a47a177 --- /dev/null +++ b/docs/examples/java/account/create-m-f-a-recovery-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/java/account/delete-m-f-a-authenticator.md b/docs/examples/java/account/delete-m-f-a-authenticator.md new file mode 100644 index 00000000..20a6acda --- /dev/null +++ b/docs/examples/java/account/delete-m-f-a-authenticator.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteMFAAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/account/get-m-f-a-recovery-codes.md b/docs/examples/java/account/get-m-f-a-recovery-codes.md new file mode 100644 index 00000000..813a0a62 --- /dev/null +++ b/docs/examples/java/account/get-m-f-a-recovery-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.getMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/java/account/list-m-f-a-factors.md b/docs/examples/java/account/list-m-f-a-factors.md new file mode 100644 index 00000000..0bdc378b --- /dev/null +++ b/docs/examples/java/account/list-m-f-a-factors.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listMFAFactors(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/java/account/update-m-f-a-authenticator.md b/docs/examples/java/account/update-m-f-a-authenticator.md new file mode 100644 index 00000000..87e3852c --- /dev/null +++ b/docs/examples/java/account/update-m-f-a-authenticator.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMFAAuthenticator( + AuthenticatorType.TOTP, // type + "", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/account/update-m-f-a-challenge.md b/docs/examples/java/account/update-m-f-a-challenge.md new file mode 100644 index 00000000..5e1bebe6 --- /dev/null +++ b/docs/examples/java/account/update-m-f-a-challenge.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMFAChallenge( + "", // challengeId + "", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/account/update-m-f-a-recovery-codes.md b/docs/examples/java/account/update-m-f-a-recovery-codes.md new file mode 100644 index 00000000..7c303ddc --- /dev/null +++ b/docs/examples/java/account/update-m-f-a-recovery-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/java/messaging/create-a-p-n-s-provider.md b/docs/examples/java/messaging/create-a-p-n-s-provider.md new file mode 100644 index 00000000..acae476a --- /dev/null +++ b/docs/examples/java/messaging/create-a-p-n-s-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createAPNSProvider( + "", // providerId + "", // name + "", // authKey (optional) + "", // authKeyId (optional) + "", // teamId (optional) + "", // bundleId (optional) + false, // sandbox (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/messaging/create-f-c-m-provider.md b/docs/examples/java/messaging/create-f-c-m-provider.md new file mode 100644 index 00000000..0d67e28c --- /dev/null +++ b/docs/examples/java/messaging/create-f-c-m-provider.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createFCMProvider( + "", // providerId + "", // name + mapOf( "a" to "b" ), // serviceAccountJSON (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/messaging/create-s-m-s.md b/docs/examples/java/messaging/create-s-m-s.md new file mode 100644 index 00000000..ca40cc33 --- /dev/null +++ b/docs/examples/java/messaging/create-s-m-s.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createSMS( + "", // messageId + "", // content + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + false, // draft (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/messaging/create-s-m-t-p-provider.md b/docs/examples/java/messaging/create-s-m-t-p-provider.md new file mode 100644 index 00000000..1f1a0f99 --- /dev/null +++ b/docs/examples/java/messaging/create-s-m-t-p-provider.md @@ -0,0 +1,36 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createSMTPProvider( + "", // providerId + "", // name + "", // host + 1, // port (optional) + "", // username (optional) + "", // password (optional) + SmtpEncryption.NONE, // encryption (optional) + false, // autoTLS (optional) + "", // mailer (optional) + "", // fromName (optional) + "email@example.com", // fromEmail (optional) + "", // replyToName (optional) + "email@example.com", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/messaging/update-a-p-n-s-provider.md b/docs/examples/java/messaging/update-a-p-n-s-provider.md new file mode 100644 index 00000000..c5da5ba8 --- /dev/null +++ b/docs/examples/java/messaging/update-a-p-n-s-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateAPNSProvider( + "", // providerId + "", // name (optional) + false, // enabled (optional) + "", // authKey (optional) + "", // authKeyId (optional) + "", // teamId (optional) + "", // bundleId (optional) + false, // sandbox (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/messaging/update-f-c-m-provider.md b/docs/examples/java/messaging/update-f-c-m-provider.md new file mode 100644 index 00000000..dd92f932 --- /dev/null +++ b/docs/examples/java/messaging/update-f-c-m-provider.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateFCMProvider( + "", // providerId + "", // name (optional) + false, // enabled (optional) + mapOf( "a" to "b" ), // serviceAccountJSON (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/messaging/update-s-m-s.md b/docs/examples/java/messaging/update-s-m-s.md new file mode 100644 index 00000000..c59505b6 --- /dev/null +++ b/docs/examples/java/messaging/update-s-m-s.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSMS( + "", // messageId + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + "", // content (optional) + false, // draft (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/messaging/update-s-m-t-p-provider.md b/docs/examples/java/messaging/update-s-m-t-p-provider.md new file mode 100644 index 00000000..36f12003 --- /dev/null +++ b/docs/examples/java/messaging/update-s-m-t-p-provider.md @@ -0,0 +1,36 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSMTPProvider( + "", // providerId + "", // name (optional) + "", // host (optional) + 1, // port (optional) + "", // username (optional) + "", // password (optional) + SmtpEncryption.NONE, // encryption (optional) + false, // autoTLS (optional) + "", // mailer (optional) + "", // fromName (optional) + "email@example.com", // fromEmail (optional) + "", // replyToName (optional) + "", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tablesdb/create-boolean-column.md b/docs/examples/java/tablesdb/create-boolean-column.md index 76976cec..14a96a14 100644 --- a/docs/examples/java/tablesdb/create-boolean-column.md +++ b/docs/examples/java/tablesdb/create-boolean-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createBooleanColumn( +tablesDB.createBooleanColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/create-datetime-column.md b/docs/examples/java/tablesdb/create-datetime-column.md index 5608fdaf..6dd28b36 100644 --- a/docs/examples/java/tablesdb/create-datetime-column.md +++ b/docs/examples/java/tablesdb/create-datetime-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createDatetimeColumn( +tablesDB.createDatetimeColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/create-email-column.md b/docs/examples/java/tablesdb/create-email-column.md index 098a5858..e9f3d368 100644 --- a/docs/examples/java/tablesdb/create-email-column.md +++ b/docs/examples/java/tablesdb/create-email-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createEmailColumn( +tablesDB.createEmailColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/create-enum-column.md b/docs/examples/java/tablesdb/create-enum-column.md index 1a56df8b..bc31bbe7 100644 --- a/docs/examples/java/tablesdb/create-enum-column.md +++ b/docs/examples/java/tablesdb/create-enum-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createEnumColumn( +tablesDB.createEnumColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/create-float-column.md b/docs/examples/java/tablesdb/create-float-column.md index af9a3e35..51312d03 100644 --- a/docs/examples/java/tablesdb/create-float-column.md +++ b/docs/examples/java/tablesdb/create-float-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createFloatColumn( +tablesDB.createFloatColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/create-index.md b/docs/examples/java/tablesdb/create-index.md index b33ba2ca..991bd342 100644 --- a/docs/examples/java/tablesdb/create-index.md +++ b/docs/examples/java/tablesdb/create-index.md @@ -1,6 +1,6 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; import io.appwrite.enums.IndexType; Client client = new Client() @@ -8,9 +8,9 @@ Client client = new Client() .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createIndex( +tablesDB.createIndex( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/create-integer-column.md b/docs/examples/java/tablesdb/create-integer-column.md index 313f53d9..1e0a3633 100644 --- a/docs/examples/java/tablesdb/create-integer-column.md +++ b/docs/examples/java/tablesdb/create-integer-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createIntegerColumn( +tablesDB.createIntegerColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/create-ip-column.md b/docs/examples/java/tablesdb/create-ip-column.md index d995ea85..a963cc10 100644 --- a/docs/examples/java/tablesdb/create-ip-column.md +++ b/docs/examples/java/tablesdb/create-ip-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createIpColumn( +tablesDB.createIpColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/create-relationship-column.md b/docs/examples/java/tablesdb/create-relationship-column.md index 8aa904fe..956c1fa5 100644 --- a/docs/examples/java/tablesdb/create-relationship-column.md +++ b/docs/examples/java/tablesdb/create-relationship-column.md @@ -1,6 +1,6 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; import io.appwrite.enums.RelationshipType; Client client = new Client() @@ -8,9 +8,9 @@ Client client = new Client() .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createRelationshipColumn( +tablesDB.createRelationshipColumn( "", // databaseId "", // tableId "", // relatedTableId diff --git a/docs/examples/java/tablesdb/create-row.md b/docs/examples/java/tablesdb/create-row.md index 6a379cfd..41450220 100644 --- a/docs/examples/java/tablesdb/create-row.md +++ b/docs/examples/java/tablesdb/create-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession(""); // The user session to authenticate with -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createRow( +tablesDB.createRow( "", // databaseId "", // tableId "", // rowId diff --git a/docs/examples/java/tablesdb/create-rows.md b/docs/examples/java/tablesdb/create-rows.md index 0e8a46ec..21bdd218 100644 --- a/docs/examples/java/tablesdb/create-rows.md +++ b/docs/examples/java/tablesdb/create-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createRows( +tablesDB.createRows( "", // databaseId "", // tableId listOf(), // rows diff --git a/docs/examples/java/tablesdb/create-string-column.md b/docs/examples/java/tablesdb/create-string-column.md index 63886630..35963400 100644 --- a/docs/examples/java/tablesdb/create-string-column.md +++ b/docs/examples/java/tablesdb/create-string-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createStringColumn( +tablesDB.createStringColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/create-table.md b/docs/examples/java/tablesdb/create-table.md index 1c546bf4..5bd3b6d0 100644 --- a/docs/examples/java/tablesdb/create-table.md +++ b/docs/examples/java/tablesdb/create-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createTable( +tablesDB.createTable( "", // databaseId "", // tableId "", // name diff --git a/docs/examples/java/tablesdb/create-url-column.md b/docs/examples/java/tablesdb/create-url-column.md index 6e2caff9..20c10e62 100644 --- a/docs/examples/java/tablesdb/create-url-column.md +++ b/docs/examples/java/tablesdb/create-url-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.createUrlColumn( +tablesDB.createUrlColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/create.md b/docs/examples/java/tablesdb/create.md index 76fac7a8..112e8e6d 100644 --- a/docs/examples/java/tablesdb/create.md +++ b/docs/examples/java/tablesdb/create.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.create( +tablesDB.create( "", // databaseId "", // name false, // enabled (optional) diff --git a/docs/examples/java/tablesdb/decrement-row-column.md b/docs/examples/java/tablesdb/decrement-row-column.md index 9d75b65a..b9f250f4 100644 --- a/docs/examples/java/tablesdb/decrement-row-column.md +++ b/docs/examples/java/tablesdb/decrement-row-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession(""); // The user session to authenticate with -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.decrementRowColumn( +tablesDB.decrementRowColumn( "", // databaseId "", // tableId "", // rowId diff --git a/docs/examples/java/tablesdb/delete-column.md b/docs/examples/java/tablesdb/delete-column.md index 2dbfb452..25d94d2f 100644 --- a/docs/examples/java/tablesdb/delete-column.md +++ b/docs/examples/java/tablesdb/delete-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.deleteColumn( +tablesDB.deleteColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/delete-index.md b/docs/examples/java/tablesdb/delete-index.md index ac045c1d..aa40dd07 100644 --- a/docs/examples/java/tablesdb/delete-index.md +++ b/docs/examples/java/tablesdb/delete-index.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.deleteIndex( +tablesDB.deleteIndex( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/delete-row.md b/docs/examples/java/tablesdb/delete-row.md index f0ce9ffc..fd66525a 100644 --- a/docs/examples/java/tablesdb/delete-row.md +++ b/docs/examples/java/tablesdb/delete-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession(""); // The user session to authenticate with -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.deleteRow( +tablesDB.deleteRow( "", // databaseId "", // tableId "", // rowId diff --git a/docs/examples/java/tablesdb/delete-rows.md b/docs/examples/java/tablesdb/delete-rows.md index e6ebd662..43b772e1 100644 --- a/docs/examples/java/tablesdb/delete-rows.md +++ b/docs/examples/java/tablesdb/delete-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.deleteRows( +tablesDB.deleteRows( "", // databaseId "", // tableId listOf(), // queries (optional) diff --git a/docs/examples/java/tablesdb/delete-table.md b/docs/examples/java/tablesdb/delete-table.md index e7004659..dcd6daa9 100644 --- a/docs/examples/java/tablesdb/delete-table.md +++ b/docs/examples/java/tablesdb/delete-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.deleteTable( +tablesDB.deleteTable( "", // databaseId "", // tableId new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/tablesdb/delete.md b/docs/examples/java/tablesdb/delete.md index 8f00c7f7..ea30c344 100644 --- a/docs/examples/java/tablesdb/delete.md +++ b/docs/examples/java/tablesdb/delete.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.delete( +tablesDB.delete( "", // databaseId new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/get-column.md b/docs/examples/java/tablesdb/get-column.md index 4c641956..42ed7760 100644 --- a/docs/examples/java/tablesdb/get-column.md +++ b/docs/examples/java/tablesdb/get-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.getColumn( +tablesDB.getColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/get-index.md b/docs/examples/java/tablesdb/get-index.md index 469d6aa7..d14579d2 100644 --- a/docs/examples/java/tablesdb/get-index.md +++ b/docs/examples/java/tablesdb/get-index.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.getIndex( +tablesDB.getIndex( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/get-row.md b/docs/examples/java/tablesdb/get-row.md index 5bc6a012..03cf3fb2 100644 --- a/docs/examples/java/tablesdb/get-row.md +++ b/docs/examples/java/tablesdb/get-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession(""); // The user session to authenticate with -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.getRow( +tablesDB.getRow( "", // databaseId "", // tableId "", // rowId diff --git a/docs/examples/java/tablesdb/get-table.md b/docs/examples/java/tablesdb/get-table.md index a03f008a..44862492 100644 --- a/docs/examples/java/tablesdb/get-table.md +++ b/docs/examples/java/tablesdb/get-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.getTable( +tablesDB.getTable( "", // databaseId "", // tableId new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/tablesdb/get.md b/docs/examples/java/tablesdb/get.md index c5c0a640..6480d62d 100644 --- a/docs/examples/java/tablesdb/get.md +++ b/docs/examples/java/tablesdb/get.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.get( +tablesDB.get( "", // databaseId 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 0f3cc089..db48d05c 100644 --- a/docs/examples/java/tablesdb/increment-row-column.md +++ b/docs/examples/java/tablesdb/increment-row-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession(""); // The user session to authenticate with -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.incrementRowColumn( +tablesDB.incrementRowColumn( "", // databaseId "", // tableId "", // rowId diff --git a/docs/examples/java/tablesdb/list-columns.md b/docs/examples/java/tablesdb/list-columns.md index 0d5dca61..f0e70d3d 100644 --- a/docs/examples/java/tablesdb/list-columns.md +++ b/docs/examples/java/tablesdb/list-columns.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.listColumns( +tablesDB.listColumns( "", // databaseId "", // tableId listOf(), // queries (optional) diff --git a/docs/examples/java/tablesdb/list-indexes.md b/docs/examples/java/tablesdb/list-indexes.md index 3450f1e7..1e5d1f9e 100644 --- a/docs/examples/java/tablesdb/list-indexes.md +++ b/docs/examples/java/tablesdb/list-indexes.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.listIndexes( +tablesDB.listIndexes( "", // databaseId "", // tableId listOf(), // queries (optional) diff --git a/docs/examples/java/tablesdb/list-rows.md b/docs/examples/java/tablesdb/list-rows.md index 91737670..52cf2a16 100644 --- a/docs/examples/java/tablesdb/list-rows.md +++ b/docs/examples/java/tablesdb/list-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession(""); // The user session to authenticate with -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.listRows( +tablesDB.listRows( "", // databaseId "", // tableId listOf(), // queries (optional) diff --git a/docs/examples/java/tablesdb/list-tables.md b/docs/examples/java/tablesdb/list-tables.md index 4b99430e..5e98cb60 100644 --- a/docs/examples/java/tablesdb/list-tables.md +++ b/docs/examples/java/tablesdb/list-tables.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.listTables( +tablesDB.listTables( "", // databaseId listOf(), // queries (optional) "", // search (optional) diff --git a/docs/examples/java/tablesdb/list.md b/docs/examples/java/tablesdb/list.md index 3d690597..34dc9dae 100644 --- a/docs/examples/java/tablesdb/list.md +++ b/docs/examples/java/tablesdb/list.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.list( +tablesDB.list( listOf(), // queries (optional) "", // search (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/tablesdb/update-boolean-column.md b/docs/examples/java/tablesdb/update-boolean-column.md index bd93250e..d31932f2 100644 --- a/docs/examples/java/tablesdb/update-boolean-column.md +++ b/docs/examples/java/tablesdb/update-boolean-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateBooleanColumn( +tablesDB.updateBooleanColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/update-datetime-column.md b/docs/examples/java/tablesdb/update-datetime-column.md index ac81f43f..b9fb3b23 100644 --- a/docs/examples/java/tablesdb/update-datetime-column.md +++ b/docs/examples/java/tablesdb/update-datetime-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateDatetimeColumn( +tablesDB.updateDatetimeColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/update-email-column.md b/docs/examples/java/tablesdb/update-email-column.md index a8f5e134..ed6b93b1 100644 --- a/docs/examples/java/tablesdb/update-email-column.md +++ b/docs/examples/java/tablesdb/update-email-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateEmailColumn( +tablesDB.updateEmailColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/update-enum-column.md b/docs/examples/java/tablesdb/update-enum-column.md index 24dd809a..5a8036ae 100644 --- a/docs/examples/java/tablesdb/update-enum-column.md +++ b/docs/examples/java/tablesdb/update-enum-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateEnumColumn( +tablesDB.updateEnumColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/update-float-column.md b/docs/examples/java/tablesdb/update-float-column.md index 5875225e..0487c06b 100644 --- a/docs/examples/java/tablesdb/update-float-column.md +++ b/docs/examples/java/tablesdb/update-float-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateFloatColumn( +tablesDB.updateFloatColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/update-integer-column.md b/docs/examples/java/tablesdb/update-integer-column.md index ef5f3298..a9ed33a9 100644 --- a/docs/examples/java/tablesdb/update-integer-column.md +++ b/docs/examples/java/tablesdb/update-integer-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateIntegerColumn( +tablesDB.updateIntegerColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/update-ip-column.md b/docs/examples/java/tablesdb/update-ip-column.md index c7010e48..32509547 100644 --- a/docs/examples/java/tablesdb/update-ip-column.md +++ b/docs/examples/java/tablesdb/update-ip-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateIpColumn( +tablesDB.updateIpColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/update-relationship-column.md b/docs/examples/java/tablesdb/update-relationship-column.md index f417691d..45aea8ae 100644 --- a/docs/examples/java/tablesdb/update-relationship-column.md +++ b/docs/examples/java/tablesdb/update-relationship-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateRelationshipColumn( +tablesDB.updateRelationshipColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/update-row.md b/docs/examples/java/tablesdb/update-row.md index 9756aa13..bedc816f 100644 --- a/docs/examples/java/tablesdb/update-row.md +++ b/docs/examples/java/tablesdb/update-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession(""); // The user session to authenticate with -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateRow( +tablesDB.updateRow( "", // databaseId "", // tableId "", // rowId diff --git a/docs/examples/java/tablesdb/update-rows.md b/docs/examples/java/tablesdb/update-rows.md index e813de2f..169b57c3 100644 --- a/docs/examples/java/tablesdb/update-rows.md +++ b/docs/examples/java/tablesdb/update-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateRows( +tablesDB.updateRows( "", // databaseId "", // tableId mapOf( "a" to "b" ), // data (optional) diff --git a/docs/examples/java/tablesdb/update-string-column.md b/docs/examples/java/tablesdb/update-string-column.md index 115a2595..36a2ed59 100644 --- a/docs/examples/java/tablesdb/update-string-column.md +++ b/docs/examples/java/tablesdb/update-string-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateStringColumn( +tablesDB.updateStringColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/update-table.md b/docs/examples/java/tablesdb/update-table.md index 1bcd8a9a..e593a046 100644 --- a/docs/examples/java/tablesdb/update-table.md +++ b/docs/examples/java/tablesdb/update-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateTable( +tablesDB.updateTable( "", // databaseId "", // tableId "", // name diff --git a/docs/examples/java/tablesdb/update-url-column.md b/docs/examples/java/tablesdb/update-url-column.md index 0b15649a..d2273b9e 100644 --- a/docs/examples/java/tablesdb/update-url-column.md +++ b/docs/examples/java/tablesdb/update-url-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.updateUrlColumn( +tablesDB.updateUrlColumn( "", // databaseId "", // tableId "", // key diff --git a/docs/examples/java/tablesdb/update.md b/docs/examples/java/tablesdb/update.md index 3c29c3cb..3b1da0c1 100644 --- a/docs/examples/java/tablesdb/update.md +++ b/docs/examples/java/tablesdb/update.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.update( +tablesDB.update( "", // databaseId "", // name false, // enabled (optional) diff --git a/docs/examples/java/tablesdb/upsert-row.md b/docs/examples/java/tablesdb/upsert-row.md index 6eaf665f..d6155fcd 100644 --- a/docs/examples/java/tablesdb/upsert-row.md +++ b/docs/examples/java/tablesdb/upsert-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession(""); // The user session to authenticate with -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.upsertRow( +tablesDB.upsertRow( "", // databaseId "", // tableId "", // rowId diff --git a/docs/examples/java/tablesdb/upsert-rows.md b/docs/examples/java/tablesdb/upsert-rows.md index 4af4f611..da15f6a0 100644 --- a/docs/examples/java/tablesdb/upsert-rows.md +++ b/docs/examples/java/tablesdb/upsert-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDb; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey(""); // Your secret API key -TablesDb tablesDb = new TablesDb(client); +TablesDB tablesDB = new TablesDB(client); -tablesDb.upsertRows( +tablesDB.upsertRows( "", // databaseId "", // tableId listOf(), // rows diff --git a/docs/examples/java/users/create-m-f-a-recovery-codes.md b/docs/examples/java/users/create-m-f-a-recovery-codes.md new file mode 100644 index 00000000..167c92cb --- /dev/null +++ b/docs/examples/java/users/create-m-f-a-recovery-codes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Users users = new Users(client); + +users.createMFARecoveryCodes( + "", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/users/delete-m-f-a-authenticator.md b/docs/examples/java/users/delete-m-f-a-authenticator.md new file mode 100644 index 00000000..c27b39ef --- /dev/null +++ b/docs/examples/java/users/delete-m-f-a-authenticator.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Users users = new Users(client); + +users.deleteMFAAuthenticator( + "", // userId + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/users/get-m-f-a-recovery-codes.md b/docs/examples/java/users/get-m-f-a-recovery-codes.md new file mode 100644 index 00000000..e6173557 --- /dev/null +++ b/docs/examples/java/users/get-m-f-a-recovery-codes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Users users = new Users(client); + +users.getMFARecoveryCodes( + "", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/users/list-m-f-a-factors.md b/docs/examples/java/users/list-m-f-a-factors.md new file mode 100644 index 00000000..c26f463b --- /dev/null +++ b/docs/examples/java/users/list-m-f-a-factors.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Users users = new Users(client); + +users.listMFAFactors( + "", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/users/update-m-f-a-recovery-codes.md b/docs/examples/java/users/update-m-f-a-recovery-codes.md new file mode 100644 index 00000000..98522b62 --- /dev/null +++ b/docs/examples/java/users/update-m-f-a-recovery-codes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Users users = new Users(client); + +users.updateMFARecoveryCodes( + "", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/users/update-m-f-a.md b/docs/examples/java/users/update-m-f-a.md new file mode 100644 index 00000000..dbcded6d --- /dev/null +++ b/docs/examples/java/users/update-m-f-a.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Users users = new Users(client); + +users.updateMFA( + "", // userId + false, // mfa + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/kotlin/account/create-m-f-a-authenticator.md b/docs/examples/kotlin/account/create-m-f-a-authenticator.md new file mode 100644 index 00000000..fed90b4a --- /dev/null +++ b/docs/examples/kotlin/account/create-m-f-a-authenticator.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createMFAAuthenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/kotlin/account/create-m-f-a-challenge.md b/docs/examples/kotlin/account/create-m-f-a-challenge.md new file mode 100644 index 00000000..7213142a --- /dev/null +++ b/docs/examples/kotlin/account/create-m-f-a-challenge.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticationFactor + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val response = account.createMFAChallenge( + factor = AuthenticationFactor.EMAIL +) diff --git a/docs/examples/kotlin/account/create-m-f-a-recovery-codes.md b/docs/examples/kotlin/account/create-m-f-a-recovery-codes.md new file mode 100644 index 00000000..c01499b0 --- /dev/null +++ b/docs/examples/kotlin/account/create-m-f-a-recovery-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createMFARecoveryCodes() diff --git a/docs/examples/kotlin/account/delete-m-f-a-authenticator.md b/docs/examples/kotlin/account/delete-m-f-a-authenticator.md new file mode 100644 index 00000000..9b06f8cd --- /dev/null +++ b/docs/examples/kotlin/account/delete-m-f-a-authenticator.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteMFAAuthenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/kotlin/account/get-m-f-a-recovery-codes.md b/docs/examples/kotlin/account/get-m-f-a-recovery-codes.md new file mode 100644 index 00000000..96567f4c --- /dev/null +++ b/docs/examples/kotlin/account/get-m-f-a-recovery-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.getMFARecoveryCodes() diff --git a/docs/examples/kotlin/account/list-m-f-a-factors.md b/docs/examples/kotlin/account/list-m-f-a-factors.md new file mode 100644 index 00000000..0f073df3 --- /dev/null +++ b/docs/examples/kotlin/account/list-m-f-a-factors.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listMFAFactors() diff --git a/docs/examples/kotlin/account/update-m-f-a-authenticator.md b/docs/examples/kotlin/account/update-m-f-a-authenticator.md new file mode 100644 index 00000000..99764f2f --- /dev/null +++ b/docs/examples/kotlin/account/update-m-f-a-authenticator.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMFAAuthenticator( + type = AuthenticatorType.TOTP, + otp = "" +) diff --git a/docs/examples/kotlin/account/update-m-f-a-challenge.md b/docs/examples/kotlin/account/update-m-f-a-challenge.md new file mode 100644 index 00000000..de908736 --- /dev/null +++ b/docs/examples/kotlin/account/update-m-f-a-challenge.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMFAChallenge( + challengeId = "", + otp = "" +) diff --git a/docs/examples/kotlin/account/update-m-f-a-recovery-codes.md b/docs/examples/kotlin/account/update-m-f-a-recovery-codes.md new file mode 100644 index 00000000..05f6476e --- /dev/null +++ b/docs/examples/kotlin/account/update-m-f-a-recovery-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMFARecoveryCodes() diff --git a/docs/examples/kotlin/messaging/create-a-p-n-s-provider.md b/docs/examples/kotlin/messaging/create-a-p-n-s-provider.md new file mode 100644 index 00000000..5104edf3 --- /dev/null +++ b/docs/examples/kotlin/messaging/create-a-p-n-s-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createAPNSProvider( + providerId = "", + name = "", + authKey = "", // optional + authKeyId = "", // optional + teamId = "", // optional + bundleId = "", // optional + sandbox = false, // optional + enabled = false // optional +) diff --git a/docs/examples/kotlin/messaging/create-f-c-m-provider.md b/docs/examples/kotlin/messaging/create-f-c-m-provider.md new file mode 100644 index 00000000..b1a2ef83 --- /dev/null +++ b/docs/examples/kotlin/messaging/create-f-c-m-provider.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createFCMProvider( + providerId = "", + name = "", + serviceAccountJSON = mapOf( "a" to "b" ), // optional + enabled = false // optional +) diff --git a/docs/examples/kotlin/messaging/create-s-m-s.md b/docs/examples/kotlin/messaging/create-s-m-s.md new file mode 100644 index 00000000..54c06eb3 --- /dev/null +++ b/docs/examples/kotlin/messaging/create-s-m-s.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createSMS( + messageId = "", + content = "", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + draft = false, // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/kotlin/messaging/create-s-m-t-p-provider.md b/docs/examples/kotlin/messaging/create-s-m-t-p-provider.md new file mode 100644 index 00000000..ce50130e --- /dev/null +++ b/docs/examples/kotlin/messaging/create-s-m-t-p-provider.md @@ -0,0 +1,27 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createSMTPProvider( + providerId = "", + name = "", + host = "", + port = 1, // optional + username = "", // optional + password = "", // optional + encryption = "none", // optional + autoTLS = false, // optional + mailer = "", // optional + fromName = "", // optional + fromEmail = "email@example.com", // optional + replyToName = "", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) diff --git a/docs/examples/kotlin/messaging/update-a-p-n-s-provider.md b/docs/examples/kotlin/messaging/update-a-p-n-s-provider.md new file mode 100644 index 00000000..29b436e4 --- /dev/null +++ b/docs/examples/kotlin/messaging/update-a-p-n-s-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateAPNSProvider( + providerId = "", + name = "", // optional + enabled = false, // optional + authKey = "", // optional + authKeyId = "", // optional + teamId = "", // optional + bundleId = "", // optional + sandbox = false // optional +) diff --git a/docs/examples/kotlin/messaging/update-f-c-m-provider.md b/docs/examples/kotlin/messaging/update-f-c-m-provider.md new file mode 100644 index 00000000..84e5635f --- /dev/null +++ b/docs/examples/kotlin/messaging/update-f-c-m-provider.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateFCMProvider( + providerId = "", + name = "", // optional + enabled = false, // optional + serviceAccountJSON = mapOf( "a" to "b" ) // optional +) diff --git a/docs/examples/kotlin/messaging/update-s-m-s.md b/docs/examples/kotlin/messaging/update-s-m-s.md new file mode 100644 index 00000000..534e9add --- /dev/null +++ b/docs/examples/kotlin/messaging/update-s-m-s.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSMS( + messageId = "", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + content = "", // optional + draft = false, // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/kotlin/messaging/update-s-m-t-p-provider.md b/docs/examples/kotlin/messaging/update-s-m-t-p-provider.md new file mode 100644 index 00000000..7652e531 --- /dev/null +++ b/docs/examples/kotlin/messaging/update-s-m-t-p-provider.md @@ -0,0 +1,27 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSMTPProvider( + providerId = "", + name = "", // optional + host = "", // optional + port = 1, // optional + username = "", // optional + password = "", // optional + encryption = "none", // optional + autoTLS = false, // optional + mailer = "", // optional + fromName = "", // optional + fromEmail = "email@example.com", // optional + replyToName = "", // optional + replyToEmail = "", // optional + enabled = false // optional +) diff --git a/docs/examples/kotlin/tablesdb/create-boolean-column.md b/docs/examples/kotlin/tablesdb/create-boolean-column.md index befa8438..fac14d91 100644 --- a/docs/examples/kotlin/tablesdb/create-boolean-column.md +++ b/docs/examples/kotlin/tablesdb/create-boolean-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createBooleanColumn( +val response = tablesDB.createBooleanColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/create-datetime-column.md b/docs/examples/kotlin/tablesdb/create-datetime-column.md index 01130c8f..e40d8e47 100644 --- a/docs/examples/kotlin/tablesdb/create-datetime-column.md +++ b/docs/examples/kotlin/tablesdb/create-datetime-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createDatetimeColumn( +val response = tablesDB.createDatetimeColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/create-email-column.md b/docs/examples/kotlin/tablesdb/create-email-column.md index 9d47a820..e93e0b89 100644 --- a/docs/examples/kotlin/tablesdb/create-email-column.md +++ b/docs/examples/kotlin/tablesdb/create-email-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createEmailColumn( +val response = tablesDB.createEmailColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/create-enum-column.md b/docs/examples/kotlin/tablesdb/create-enum-column.md index 49b74308..1d19a589 100644 --- a/docs/examples/kotlin/tablesdb/create-enum-column.md +++ b/docs/examples/kotlin/tablesdb/create-enum-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createEnumColumn( +val response = tablesDB.createEnumColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/create-float-column.md b/docs/examples/kotlin/tablesdb/create-float-column.md index db2dac01..3c24b0d9 100644 --- a/docs/examples/kotlin/tablesdb/create-float-column.md +++ b/docs/examples/kotlin/tablesdb/create-float-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createFloatColumn( +val response = tablesDB.createFloatColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/create-index.md b/docs/examples/kotlin/tablesdb/create-index.md index a0da817e..2492f715 100644 --- a/docs/examples/kotlin/tablesdb/create-index.md +++ b/docs/examples/kotlin/tablesdb/create-index.md @@ -1,6 +1,6 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB import io.appwrite.enums.IndexType val client = Client() @@ -8,9 +8,9 @@ val client = Client() .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createIndex( +val response = tablesDB.createIndex( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/create-integer-column.md b/docs/examples/kotlin/tablesdb/create-integer-column.md index 6297cdfa..90c558c4 100644 --- a/docs/examples/kotlin/tablesdb/create-integer-column.md +++ b/docs/examples/kotlin/tablesdb/create-integer-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createIntegerColumn( +val response = tablesDB.createIntegerColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/create-ip-column.md b/docs/examples/kotlin/tablesdb/create-ip-column.md index 67052c85..81412c7a 100644 --- a/docs/examples/kotlin/tablesdb/create-ip-column.md +++ b/docs/examples/kotlin/tablesdb/create-ip-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createIpColumn( +val response = tablesDB.createIpColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/create-relationship-column.md b/docs/examples/kotlin/tablesdb/create-relationship-column.md index c1f13049..fbdf3653 100644 --- a/docs/examples/kotlin/tablesdb/create-relationship-column.md +++ b/docs/examples/kotlin/tablesdb/create-relationship-column.md @@ -1,6 +1,6 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB import io.appwrite.enums.RelationshipType val client = Client() @@ -8,9 +8,9 @@ val client = Client() .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createRelationshipColumn( +val response = tablesDB.createRelationshipColumn( databaseId = "", tableId = "", relatedTableId = "", diff --git a/docs/examples/kotlin/tablesdb/create-row.md b/docs/examples/kotlin/tablesdb/create-row.md index 217f2eeb..6a5b1881 100644 --- a/docs/examples/kotlin/tablesdb/create-row.md +++ b/docs/examples/kotlin/tablesdb/create-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession("") // The user session to authenticate with -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createRow( +val response = tablesDB.createRow( databaseId = "", tableId = "", rowId = "", diff --git a/docs/examples/kotlin/tablesdb/create-rows.md b/docs/examples/kotlin/tablesdb/create-rows.md index 01a3554a..1da47b5c 100644 --- a/docs/examples/kotlin/tablesdb/create-rows.md +++ b/docs/examples/kotlin/tablesdb/create-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createRows( +val response = tablesDB.createRows( databaseId = "", tableId = "", rows = listOf() diff --git a/docs/examples/kotlin/tablesdb/create-string-column.md b/docs/examples/kotlin/tablesdb/create-string-column.md index 9061a1a0..5b5d88db 100644 --- a/docs/examples/kotlin/tablesdb/create-string-column.md +++ b/docs/examples/kotlin/tablesdb/create-string-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createStringColumn( +val response = tablesDB.createStringColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/create-table.md b/docs/examples/kotlin/tablesdb/create-table.md index f1603fbb..88b50d22 100644 --- a/docs/examples/kotlin/tablesdb/create-table.md +++ b/docs/examples/kotlin/tablesdb/create-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createTable( +val response = tablesDB.createTable( databaseId = "", tableId = "", name = "", diff --git a/docs/examples/kotlin/tablesdb/create-url-column.md b/docs/examples/kotlin/tablesdb/create-url-column.md index 2c8f7af3..a0351e4f 100644 --- a/docs/examples/kotlin/tablesdb/create-url-column.md +++ b/docs/examples/kotlin/tablesdb/create-url-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.createUrlColumn( +val response = tablesDB.createUrlColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/create.md b/docs/examples/kotlin/tablesdb/create.md index b8b58aae..4b025b85 100644 --- a/docs/examples/kotlin/tablesdb/create.md +++ b/docs/examples/kotlin/tablesdb/create.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.create( +val response = tablesDB.create( databaseId = "", name = "", enabled = false // optional diff --git a/docs/examples/kotlin/tablesdb/decrement-row-column.md b/docs/examples/kotlin/tablesdb/decrement-row-column.md index cab810ad..e284ec39 100644 --- a/docs/examples/kotlin/tablesdb/decrement-row-column.md +++ b/docs/examples/kotlin/tablesdb/decrement-row-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession("") // The user session to authenticate with -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.decrementRowColumn( +val response = tablesDB.decrementRowColumn( databaseId = "", tableId = "", rowId = "", diff --git a/docs/examples/kotlin/tablesdb/delete-column.md b/docs/examples/kotlin/tablesdb/delete-column.md index ef3eaaeb..05d341d1 100644 --- a/docs/examples/kotlin/tablesdb/delete-column.md +++ b/docs/examples/kotlin/tablesdb/delete-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.deleteColumn( +val response = tablesDB.deleteColumn( databaseId = "", tableId = "", key = "" diff --git a/docs/examples/kotlin/tablesdb/delete-index.md b/docs/examples/kotlin/tablesdb/delete-index.md index 4bca972b..b5f2330d 100644 --- a/docs/examples/kotlin/tablesdb/delete-index.md +++ b/docs/examples/kotlin/tablesdb/delete-index.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.deleteIndex( +val response = tablesDB.deleteIndex( databaseId = "", tableId = "", key = "" diff --git a/docs/examples/kotlin/tablesdb/delete-row.md b/docs/examples/kotlin/tablesdb/delete-row.md index 4e2eee31..f24b9353 100644 --- a/docs/examples/kotlin/tablesdb/delete-row.md +++ b/docs/examples/kotlin/tablesdb/delete-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession("") // The user session to authenticate with -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.deleteRow( +val response = tablesDB.deleteRow( databaseId = "", tableId = "", rowId = "" diff --git a/docs/examples/kotlin/tablesdb/delete-rows.md b/docs/examples/kotlin/tablesdb/delete-rows.md index c73332c1..c915a5c5 100644 --- a/docs/examples/kotlin/tablesdb/delete-rows.md +++ b/docs/examples/kotlin/tablesdb/delete-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.deleteRows( +val response = tablesDB.deleteRows( databaseId = "", tableId = "", queries = listOf() // optional diff --git a/docs/examples/kotlin/tablesdb/delete-table.md b/docs/examples/kotlin/tablesdb/delete-table.md index 87b20e58..dce8e583 100644 --- a/docs/examples/kotlin/tablesdb/delete-table.md +++ b/docs/examples/kotlin/tablesdb/delete-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.deleteTable( +val response = tablesDB.deleteTable( databaseId = "", tableId = "" ) diff --git a/docs/examples/kotlin/tablesdb/delete.md b/docs/examples/kotlin/tablesdb/delete.md index 3af192a0..3e335fa2 100644 --- a/docs/examples/kotlin/tablesdb/delete.md +++ b/docs/examples/kotlin/tablesdb/delete.md @@ -1,14 +1,14 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.delete( +val response = tablesDB.delete( databaseId = "" ) diff --git a/docs/examples/kotlin/tablesdb/get-column.md b/docs/examples/kotlin/tablesdb/get-column.md index 78710b65..c4cf24dd 100644 --- a/docs/examples/kotlin/tablesdb/get-column.md +++ b/docs/examples/kotlin/tablesdb/get-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.getColumn( +val response = tablesDB.getColumn( databaseId = "", tableId = "", key = "" diff --git a/docs/examples/kotlin/tablesdb/get-index.md b/docs/examples/kotlin/tablesdb/get-index.md index 00c9285d..4db25474 100644 --- a/docs/examples/kotlin/tablesdb/get-index.md +++ b/docs/examples/kotlin/tablesdb/get-index.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.getIndex( +val response = tablesDB.getIndex( databaseId = "", tableId = "", key = "" diff --git a/docs/examples/kotlin/tablesdb/get-row.md b/docs/examples/kotlin/tablesdb/get-row.md index 98e92980..ec546316 100644 --- a/docs/examples/kotlin/tablesdb/get-row.md +++ b/docs/examples/kotlin/tablesdb/get-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession("") // The user session to authenticate with -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.getRow( +val response = tablesDB.getRow( databaseId = "", tableId = "", rowId = "", diff --git a/docs/examples/kotlin/tablesdb/get-table.md b/docs/examples/kotlin/tablesdb/get-table.md index 6484d408..65afae84 100644 --- a/docs/examples/kotlin/tablesdb/get-table.md +++ b/docs/examples/kotlin/tablesdb/get-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.getTable( +val response = tablesDB.getTable( databaseId = "", tableId = "" ) diff --git a/docs/examples/kotlin/tablesdb/get.md b/docs/examples/kotlin/tablesdb/get.md index 16a0739b..e58da26f 100644 --- a/docs/examples/kotlin/tablesdb/get.md +++ b/docs/examples/kotlin/tablesdb/get.md @@ -1,14 +1,14 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.get( +val response = tablesDB.get( databaseId = "" ) diff --git a/docs/examples/kotlin/tablesdb/increment-row-column.md b/docs/examples/kotlin/tablesdb/increment-row-column.md index 44782ddb..cac151e4 100644 --- a/docs/examples/kotlin/tablesdb/increment-row-column.md +++ b/docs/examples/kotlin/tablesdb/increment-row-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession("") // The user session to authenticate with -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.incrementRowColumn( +val response = tablesDB.incrementRowColumn( databaseId = "", tableId = "", rowId = "", diff --git a/docs/examples/kotlin/tablesdb/list-columns.md b/docs/examples/kotlin/tablesdb/list-columns.md index e4b10d98..85a9aabb 100644 --- a/docs/examples/kotlin/tablesdb/list-columns.md +++ b/docs/examples/kotlin/tablesdb/list-columns.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.listColumns( +val response = tablesDB.listColumns( databaseId = "", tableId = "", queries = listOf() // optional diff --git a/docs/examples/kotlin/tablesdb/list-indexes.md b/docs/examples/kotlin/tablesdb/list-indexes.md index 231ddcc2..db5aad4e 100644 --- a/docs/examples/kotlin/tablesdb/list-indexes.md +++ b/docs/examples/kotlin/tablesdb/list-indexes.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.listIndexes( +val response = tablesDB.listIndexes( databaseId = "", tableId = "", queries = listOf() // optional diff --git a/docs/examples/kotlin/tablesdb/list-rows.md b/docs/examples/kotlin/tablesdb/list-rows.md index 735c4257..b0f5df47 100644 --- a/docs/examples/kotlin/tablesdb/list-rows.md +++ b/docs/examples/kotlin/tablesdb/list-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession("") // The user session to authenticate with -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.listRows( +val response = tablesDB.listRows( databaseId = "", tableId = "", queries = listOf() // optional diff --git a/docs/examples/kotlin/tablesdb/list-tables.md b/docs/examples/kotlin/tablesdb/list-tables.md index cb7d2d59..1e8eb8f7 100644 --- a/docs/examples/kotlin/tablesdb/list-tables.md +++ b/docs/examples/kotlin/tablesdb/list-tables.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.listTables( +val response = tablesDB.listTables( databaseId = "", queries = listOf(), // optional search = "" // optional diff --git a/docs/examples/kotlin/tablesdb/list.md b/docs/examples/kotlin/tablesdb/list.md index e23135d7..58b48a09 100644 --- a/docs/examples/kotlin/tablesdb/list.md +++ b/docs/examples/kotlin/tablesdb/list.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.list( +val response = tablesDB.list( queries = listOf(), // optional search = "" // optional ) diff --git a/docs/examples/kotlin/tablesdb/update-boolean-column.md b/docs/examples/kotlin/tablesdb/update-boolean-column.md index 8090da09..43ab43bf 100644 --- a/docs/examples/kotlin/tablesdb/update-boolean-column.md +++ b/docs/examples/kotlin/tablesdb/update-boolean-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateBooleanColumn( +val response = tablesDB.updateBooleanColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/update-datetime-column.md b/docs/examples/kotlin/tablesdb/update-datetime-column.md index 14f38d53..077cff71 100644 --- a/docs/examples/kotlin/tablesdb/update-datetime-column.md +++ b/docs/examples/kotlin/tablesdb/update-datetime-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateDatetimeColumn( +val response = tablesDB.updateDatetimeColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/update-email-column.md b/docs/examples/kotlin/tablesdb/update-email-column.md index 52149182..5becaa68 100644 --- a/docs/examples/kotlin/tablesdb/update-email-column.md +++ b/docs/examples/kotlin/tablesdb/update-email-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateEmailColumn( +val response = tablesDB.updateEmailColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/update-enum-column.md b/docs/examples/kotlin/tablesdb/update-enum-column.md index 2e2be5ac..4351703e 100644 --- a/docs/examples/kotlin/tablesdb/update-enum-column.md +++ b/docs/examples/kotlin/tablesdb/update-enum-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateEnumColumn( +val response = tablesDB.updateEnumColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/update-float-column.md b/docs/examples/kotlin/tablesdb/update-float-column.md index 9519eb32..6d40c3f3 100644 --- a/docs/examples/kotlin/tablesdb/update-float-column.md +++ b/docs/examples/kotlin/tablesdb/update-float-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateFloatColumn( +val response = tablesDB.updateFloatColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/update-integer-column.md b/docs/examples/kotlin/tablesdb/update-integer-column.md index db7e172b..9d6bfaa6 100644 --- a/docs/examples/kotlin/tablesdb/update-integer-column.md +++ b/docs/examples/kotlin/tablesdb/update-integer-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateIntegerColumn( +val response = tablesDB.updateIntegerColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/update-ip-column.md b/docs/examples/kotlin/tablesdb/update-ip-column.md index bed46752..fd04b98a 100644 --- a/docs/examples/kotlin/tablesdb/update-ip-column.md +++ b/docs/examples/kotlin/tablesdb/update-ip-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateIpColumn( +val response = tablesDB.updateIpColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/update-relationship-column.md b/docs/examples/kotlin/tablesdb/update-relationship-column.md index 12a63607..f69defd8 100644 --- a/docs/examples/kotlin/tablesdb/update-relationship-column.md +++ b/docs/examples/kotlin/tablesdb/update-relationship-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateRelationshipColumn( +val response = tablesDB.updateRelationshipColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/update-row.md b/docs/examples/kotlin/tablesdb/update-row.md index 51e80144..9c5248f4 100644 --- a/docs/examples/kotlin/tablesdb/update-row.md +++ b/docs/examples/kotlin/tablesdb/update-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession("") // The user session to authenticate with -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateRow( +val response = tablesDB.updateRow( databaseId = "", tableId = "", rowId = "", diff --git a/docs/examples/kotlin/tablesdb/update-rows.md b/docs/examples/kotlin/tablesdb/update-rows.md index 008665b6..c285d5b4 100644 --- a/docs/examples/kotlin/tablesdb/update-rows.md +++ b/docs/examples/kotlin/tablesdb/update-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateRows( +val response = tablesDB.updateRows( databaseId = "", tableId = "", data = mapOf( "a" to "b" ), // optional diff --git a/docs/examples/kotlin/tablesdb/update-string-column.md b/docs/examples/kotlin/tablesdb/update-string-column.md index 9890f956..acdd3ad5 100644 --- a/docs/examples/kotlin/tablesdb/update-string-column.md +++ b/docs/examples/kotlin/tablesdb/update-string-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateStringColumn( +val response = tablesDB.updateStringColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/update-table.md b/docs/examples/kotlin/tablesdb/update-table.md index a38286fd..52389087 100644 --- a/docs/examples/kotlin/tablesdb/update-table.md +++ b/docs/examples/kotlin/tablesdb/update-table.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateTable( +val response = tablesDB.updateTable( databaseId = "", tableId = "", name = "", diff --git a/docs/examples/kotlin/tablesdb/update-url-column.md b/docs/examples/kotlin/tablesdb/update-url-column.md index ac0dcd2f..fbe68c9a 100644 --- a/docs/examples/kotlin/tablesdb/update-url-column.md +++ b/docs/examples/kotlin/tablesdb/update-url-column.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.updateUrlColumn( +val response = tablesDB.updateUrlColumn( databaseId = "", tableId = "", key = "", diff --git a/docs/examples/kotlin/tablesdb/update.md b/docs/examples/kotlin/tablesdb/update.md index 93175078..48d1a8e3 100644 --- a/docs/examples/kotlin/tablesdb/update.md +++ b/docs/examples/kotlin/tablesdb/update.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.update( +val response = tablesDB.update( databaseId = "", name = "", enabled = false // optional diff --git a/docs/examples/kotlin/tablesdb/upsert-row.md b/docs/examples/kotlin/tablesdb/upsert-row.md index 09286e40..3fcbc616 100644 --- a/docs/examples/kotlin/tablesdb/upsert-row.md +++ b/docs/examples/kotlin/tablesdb/upsert-row.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession("") // The user session to authenticate with -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.upsertRow( +val response = tablesDB.upsertRow( databaseId = "", tableId = "", rowId = "", diff --git a/docs/examples/kotlin/tablesdb/upsert-rows.md b/docs/examples/kotlin/tablesdb/upsert-rows.md index cd335841..7059c601 100644 --- a/docs/examples/kotlin/tablesdb/upsert-rows.md +++ b/docs/examples/kotlin/tablesdb/upsert-rows.md @@ -1,15 +1,15 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.TablesDb +import io.appwrite.services.TablesDB val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key -val tablesDb = TablesDb(client) +val tablesDB = TablesDB(client) -val response = tablesDb.upsertRows( +val response = tablesDB.upsertRows( databaseId = "", tableId = "", rows = listOf() diff --git a/docs/examples/kotlin/users/create-m-f-a-recovery-codes.md b/docs/examples/kotlin/users/create-m-f-a-recovery-codes.md new file mode 100644 index 00000000..7a0b1c61 --- /dev/null +++ b/docs/examples/kotlin/users/create-m-f-a-recovery-codes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val users = Users(client) + +val response = users.createMFARecoveryCodes( + userId = "" +) diff --git a/docs/examples/kotlin/users/delete-m-f-a-authenticator.md b/docs/examples/kotlin/users/delete-m-f-a-authenticator.md new file mode 100644 index 00000000..a7c80893 --- /dev/null +++ b/docs/examples/kotlin/users/delete-m-f-a-authenticator.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val users = Users(client) + +val response = users.deleteMFAAuthenticator( + userId = "", + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/kotlin/users/get-m-f-a-recovery-codes.md b/docs/examples/kotlin/users/get-m-f-a-recovery-codes.md new file mode 100644 index 00000000..1ad91975 --- /dev/null +++ b/docs/examples/kotlin/users/get-m-f-a-recovery-codes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val users = Users(client) + +val response = users.getMFARecoveryCodes( + userId = "" +) diff --git a/docs/examples/kotlin/users/list-m-f-a-factors.md b/docs/examples/kotlin/users/list-m-f-a-factors.md new file mode 100644 index 00000000..9d0791cf --- /dev/null +++ b/docs/examples/kotlin/users/list-m-f-a-factors.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val users = Users(client) + +val response = users.listMFAFactors( + userId = "" +) diff --git a/docs/examples/kotlin/users/update-m-f-a-recovery-codes.md b/docs/examples/kotlin/users/update-m-f-a-recovery-codes.md new file mode 100644 index 00000000..80b92b45 --- /dev/null +++ b/docs/examples/kotlin/users/update-m-f-a-recovery-codes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val users = Users(client) + +val response = users.updateMFARecoveryCodes( + userId = "" +) diff --git a/docs/examples/kotlin/users/update-m-f-a.md b/docs/examples/kotlin/users/update-m-f-a.md new file mode 100644 index 00000000..d2f448e0 --- /dev/null +++ b/docs/examples/kotlin/users/update-m-f-a.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val users = Users(client) + +val response = users.updateMFA( + userId = "", + mfa = false +) diff --git a/src/main/kotlin/io/appwrite/models/BucketList.kt b/src/main/kotlin/io/appwrite/models/BucketList.kt index 58cce610..8c2f2553 100644 --- a/src/main/kotlin/io/appwrite/models/BucketList.kt +++ b/src/main/kotlin/io/appwrite/models/BucketList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class BucketList( /** - * Total number of buckets rows that matched your query. + * Total number of buckets that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/CollectionList.kt b/src/main/kotlin/io/appwrite/models/CollectionList.kt index 6cd040a5..590efd65 100644 --- a/src/main/kotlin/io/appwrite/models/CollectionList.kt +++ b/src/main/kotlin/io/appwrite/models/CollectionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class CollectionList( /** - * Total number of collections rows that matched your query. + * Total number of collections that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt b/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt index fc877a9d..e532637c 100644 --- a/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt +++ b/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ColumnIndexList( /** - * Total number of indexes rows that matched your query. + * Total number of indexes that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ContinentList.kt b/src/main/kotlin/io/appwrite/models/ContinentList.kt index a6ec3103..789acff0 100644 --- a/src/main/kotlin/io/appwrite/models/ContinentList.kt +++ b/src/main/kotlin/io/appwrite/models/ContinentList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ContinentList( /** - * Total number of continents rows that matched your query. + * Total number of continents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/CountryList.kt b/src/main/kotlin/io/appwrite/models/CountryList.kt index 546cf739..47c0e724 100644 --- a/src/main/kotlin/io/appwrite/models/CountryList.kt +++ b/src/main/kotlin/io/appwrite/models/CountryList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class CountryList( /** - * Total number of countries rows that matched your query. + * Total number of countries that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/CurrencyList.kt b/src/main/kotlin/io/appwrite/models/CurrencyList.kt index 95dec926..5a57a02d 100644 --- a/src/main/kotlin/io/appwrite/models/CurrencyList.kt +++ b/src/main/kotlin/io/appwrite/models/CurrencyList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class CurrencyList( /** - * Total number of currencies rows that matched your query. + * Total number of currencies that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/DatabaseList.kt b/src/main/kotlin/io/appwrite/models/DatabaseList.kt index 3b98e298..28a2b096 100644 --- a/src/main/kotlin/io/appwrite/models/DatabaseList.kt +++ b/src/main/kotlin/io/appwrite/models/DatabaseList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class DatabaseList( /** - * Total number of databases rows that matched your query. + * Total number of databases that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/DeploymentList.kt b/src/main/kotlin/io/appwrite/models/DeploymentList.kt index 3bc6f49e..991a344e 100644 --- a/src/main/kotlin/io/appwrite/models/DeploymentList.kt +++ b/src/main/kotlin/io/appwrite/models/DeploymentList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class DeploymentList( /** - * Total number of deployments rows that matched your query. + * Total number of deployments that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/DocumentList.kt b/src/main/kotlin/io/appwrite/models/DocumentList.kt index 6f405791..c26cd26c 100644 --- a/src/main/kotlin/io/appwrite/models/DocumentList.kt +++ b/src/main/kotlin/io/appwrite/models/DocumentList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class DocumentList( /** - * Total number of documents rows that matched your query. + * Total number of documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ExecutionList.kt b/src/main/kotlin/io/appwrite/models/ExecutionList.kt index ac11e4fb..a976e783 100644 --- a/src/main/kotlin/io/appwrite/models/ExecutionList.kt +++ b/src/main/kotlin/io/appwrite/models/ExecutionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ExecutionList( /** - * Total number of executions rows that matched your query. + * Total number of executions that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/FileList.kt b/src/main/kotlin/io/appwrite/models/FileList.kt index ba69ea8c..dfdd212a 100644 --- a/src/main/kotlin/io/appwrite/models/FileList.kt +++ b/src/main/kotlin/io/appwrite/models/FileList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class FileList( /** - * Total number of files rows that matched your query. + * Total number of files that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/FrameworkList.kt b/src/main/kotlin/io/appwrite/models/FrameworkList.kt index 243bc0f5..658bab87 100644 --- a/src/main/kotlin/io/appwrite/models/FrameworkList.kt +++ b/src/main/kotlin/io/appwrite/models/FrameworkList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class FrameworkList( /** - * Total number of frameworks rows that matched your query. + * Total number of frameworks that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/FunctionList.kt b/src/main/kotlin/io/appwrite/models/FunctionList.kt index 7ffe820f..ba19cec4 100644 --- a/src/main/kotlin/io/appwrite/models/FunctionList.kt +++ b/src/main/kotlin/io/appwrite/models/FunctionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class FunctionList( /** - * Total number of functions rows that matched your query. + * Total number of functions that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/IdentityList.kt b/src/main/kotlin/io/appwrite/models/IdentityList.kt index 2e1a33a2..49c3346c 100644 --- a/src/main/kotlin/io/appwrite/models/IdentityList.kt +++ b/src/main/kotlin/io/appwrite/models/IdentityList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class IdentityList( /** - * Total number of identities rows that matched your query. + * Total number of identities that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/IndexList.kt b/src/main/kotlin/io/appwrite/models/IndexList.kt index 1c2120a3..e757c052 100644 --- a/src/main/kotlin/io/appwrite/models/IndexList.kt +++ b/src/main/kotlin/io/appwrite/models/IndexList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class IndexList( /** - * Total number of indexes rows that matched your query. + * Total number of indexes that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/LanguageList.kt b/src/main/kotlin/io/appwrite/models/LanguageList.kt index ab78452c..1aac2f7a 100644 --- a/src/main/kotlin/io/appwrite/models/LanguageList.kt +++ b/src/main/kotlin/io/appwrite/models/LanguageList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class LanguageList( /** - * Total number of languages rows that matched your query. + * Total number of languages that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt b/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt index 6f473330..7949b573 100644 --- a/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt +++ b/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class LocaleCodeList( /** - * Total number of localeCodes rows that matched your query. + * Total number of localeCodes that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/LogList.kt b/src/main/kotlin/io/appwrite/models/LogList.kt index d2e0b009..c88451cd 100644 --- a/src/main/kotlin/io/appwrite/models/LogList.kt +++ b/src/main/kotlin/io/appwrite/models/LogList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class LogList( /** - * Total number of logs rows that matched your query. + * Total number of logs that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/MembershipList.kt b/src/main/kotlin/io/appwrite/models/MembershipList.kt index efcffc47..b2bea4e8 100644 --- a/src/main/kotlin/io/appwrite/models/MembershipList.kt +++ b/src/main/kotlin/io/appwrite/models/MembershipList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class MembershipList( /** - * Total number of memberships rows that matched your query. + * Total number of memberships that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/MessageList.kt b/src/main/kotlin/io/appwrite/models/MessageList.kt index 1926541c..5f27130f 100644 --- a/src/main/kotlin/io/appwrite/models/MessageList.kt +++ b/src/main/kotlin/io/appwrite/models/MessageList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class MessageList( /** - * Total number of messages rows that matched your query. + * Total number of messages that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/PhoneList.kt b/src/main/kotlin/io/appwrite/models/PhoneList.kt index 675295f6..5f7c22f8 100644 --- a/src/main/kotlin/io/appwrite/models/PhoneList.kt +++ b/src/main/kotlin/io/appwrite/models/PhoneList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class PhoneList( /** - * Total number of phones rows that matched your query. + * Total number of phones that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ProviderList.kt b/src/main/kotlin/io/appwrite/models/ProviderList.kt index 42231243..06766631 100644 --- a/src/main/kotlin/io/appwrite/models/ProviderList.kt +++ b/src/main/kotlin/io/appwrite/models/ProviderList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ProviderList( /** - * Total number of providers rows that matched your query. + * Total number of providers that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt b/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt index aaf22f86..07b1e4c4 100644 --- a/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt +++ b/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ResourceTokenList( /** - * Total number of tokens rows that matched your query. + * Total number of tokens that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/RowList.kt b/src/main/kotlin/io/appwrite/models/RowList.kt index 289f39b7..5e99cd73 100644 --- a/src/main/kotlin/io/appwrite/models/RowList.kt +++ b/src/main/kotlin/io/appwrite/models/RowList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class RowList( /** - * Total number of rows rows that matched your query. + * Total number of rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/RuntimeList.kt b/src/main/kotlin/io/appwrite/models/RuntimeList.kt index 55c17d97..8aefaaaa 100644 --- a/src/main/kotlin/io/appwrite/models/RuntimeList.kt +++ b/src/main/kotlin/io/appwrite/models/RuntimeList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class RuntimeList( /** - * Total number of runtimes rows that matched your query. + * Total number of runtimes that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SessionList.kt b/src/main/kotlin/io/appwrite/models/SessionList.kt index 13e0c36f..22fba69e 100644 --- a/src/main/kotlin/io/appwrite/models/SessionList.kt +++ b/src/main/kotlin/io/appwrite/models/SessionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SessionList( /** - * Total number of sessions rows that matched your query. + * Total number of sessions that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SiteList.kt b/src/main/kotlin/io/appwrite/models/SiteList.kt index 53325710..f280b5d0 100644 --- a/src/main/kotlin/io/appwrite/models/SiteList.kt +++ b/src/main/kotlin/io/appwrite/models/SiteList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SiteList( /** - * Total number of sites rows that matched your query. + * Total number of sites that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SpecificationList.kt b/src/main/kotlin/io/appwrite/models/SpecificationList.kt index 5ac8cf95..f2e66882 100644 --- a/src/main/kotlin/io/appwrite/models/SpecificationList.kt +++ b/src/main/kotlin/io/appwrite/models/SpecificationList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SpecificationList( /** - * Total number of specifications rows that matched your query. + * Total number of specifications that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SubscriberList.kt b/src/main/kotlin/io/appwrite/models/SubscriberList.kt index 8f811c7d..8cfadf0c 100644 --- a/src/main/kotlin/io/appwrite/models/SubscriberList.kt +++ b/src/main/kotlin/io/appwrite/models/SubscriberList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SubscriberList( /** - * Total number of subscribers rows that matched your query. + * Total number of subscribers that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/TableList.kt b/src/main/kotlin/io/appwrite/models/TableList.kt index 3ee5afb6..0cd5cc9f 100644 --- a/src/main/kotlin/io/appwrite/models/TableList.kt +++ b/src/main/kotlin/io/appwrite/models/TableList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TableList( /** - * Total number of tables rows that matched your query. + * Total number of tables that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/TargetList.kt b/src/main/kotlin/io/appwrite/models/TargetList.kt index 8b94727d..6307609f 100644 --- a/src/main/kotlin/io/appwrite/models/TargetList.kt +++ b/src/main/kotlin/io/appwrite/models/TargetList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TargetList( /** - * Total number of targets rows that matched your query. + * Total number of targets that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/TeamList.kt b/src/main/kotlin/io/appwrite/models/TeamList.kt index f1a19688..c95cc565 100644 --- a/src/main/kotlin/io/appwrite/models/TeamList.kt +++ b/src/main/kotlin/io/appwrite/models/TeamList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TeamList( /** - * Total number of teams rows that matched your query. + * Total number of teams that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/TopicList.kt b/src/main/kotlin/io/appwrite/models/TopicList.kt index 2a1cc5f6..68be7172 100644 --- a/src/main/kotlin/io/appwrite/models/TopicList.kt +++ b/src/main/kotlin/io/appwrite/models/TopicList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TopicList( /** - * Total number of topics rows that matched your query. + * Total number of topics that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/UserList.kt b/src/main/kotlin/io/appwrite/models/UserList.kt index 3bf322e6..b89e46ed 100644 --- a/src/main/kotlin/io/appwrite/models/UserList.kt +++ b/src/main/kotlin/io/appwrite/models/UserList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class UserList( /** - * Total number of users rows that matched your query. + * Total number of users that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/VariableList.kt b/src/main/kotlin/io/appwrite/models/VariableList.kt index 3f7e4306..492b67e7 100644 --- a/src/main/kotlin/io/appwrite/models/VariableList.kt +++ b/src/main/kotlin/io/appwrite/models/VariableList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class VariableList( /** - * Total number of variables rows that matched your query. + * Total number of variables that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/services/Account.kt b/src/main/kotlin/io/appwrite/services/Account.kt index dcfe70d2..84fb4ab0 100644 --- a/src/main/kotlin/io/appwrite/services/Account.kt +++ b/src/main/kotlin/io/appwrite/services/Account.kt @@ -119,7 +119,9 @@ class Account(client: Client) : Service(client) { ) /** - * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. + * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request. + * This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. + * * * @param email User email. * @param password User password. Must be at least 8 chars. @@ -339,6 +341,11 @@ class Account(client: Client) : Service(client) { * @param type Type of authenticator. Must be `totp` * @return [io.appwrite.models.MfaType] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `CreateMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.CreateMFAAuthenticator"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun createMfaAuthenticator( type: io.appwrite.enums.AuthenticatorType, @@ -364,6 +371,37 @@ class Account(client: Client) : Service(client) { ) } + /** + * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method. + * + * @param type Type of authenticator. Must be `totp` + * @return [io.appwrite.models.MfaType] + */ + @Throws(AppwriteException::class) + suspend fun createMFAAuthenticator( + type: io.appwrite.enums.AuthenticatorType, + ): io.appwrite.models.MfaType { + val apiPath = "/account/mfa/authenticators/{type}" + .replace("{type}", type.value) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.MfaType = { + io.appwrite.models.MfaType.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.MfaType::class.java, + converter, + ) + } + /** * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. * @@ -371,6 +409,11 @@ class Account(client: Client) : Service(client) { * @param otp Valid verification token. * @return [io.appwrite.models.User] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `UpdateMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.UpdateMFAAuthenticator"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun updateMfaAuthenticator( type: io.appwrite.enums.AuthenticatorType, @@ -406,6 +449,11 @@ class Account(client: Client) : Service(client) { * @param otp Valid verification token. * @return [io.appwrite.models.User] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `UpdateMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.UpdateMFAAuthenticator"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun updateMfaAuthenticator( type: io.appwrite.enums.AuthenticatorType, @@ -416,12 +464,69 @@ class Account(client: Client) : Service(client) { nestedType = classOf(), ) + /** + * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. + * + * @param type Type of authenticator. + * @param otp Valid verification token. + * @return [io.appwrite.models.User] + */ + @Throws(AppwriteException::class) + suspend fun updateMFAAuthenticator( + type: io.appwrite.enums.AuthenticatorType, + otp: String, + nestedType: Class, + ): io.appwrite.models.User { + val apiPath = "/account/mfa/authenticators/{type}" + .replace("{type}", type.value) + + val apiParams = mutableMapOf( + "otp" to otp, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.User = { + io.appwrite.models.User.from(map = it as Map, nestedType) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. + * + * @param type Type of authenticator. + * @param otp Valid verification token. + * @return [io.appwrite.models.User] + */ + @Throws(AppwriteException::class) + suspend fun updateMFAAuthenticator( + type: io.appwrite.enums.AuthenticatorType, + otp: String, + ): io.appwrite.models.User> = updateMFAAuthenticator( + type, + otp, + nestedType = classOf(), + ) + /** * Delete an authenticator for a user by ID. * * @param type Type of authenticator. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `DeleteMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.DeleteMFAAuthenticator"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun deleteMfaAuthenticator( type: io.appwrite.enums.AuthenticatorType, @@ -443,12 +548,44 @@ class Account(client: Client) : Service(client) { ) } + /** + * Delete an authenticator for a user by ID. + * + * @param type Type of authenticator. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun deleteMFAAuthenticator( + type: io.appwrite.enums.AuthenticatorType, + ): Any { + val apiPath = "/account/mfa/authenticators/{type}" + .replace("{type}", type.value) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + /** * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. * * @param factor Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`. * @return [io.appwrite.models.MfaChallenge] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `CreateMFAChallenge` instead.", + replaceWith = ReplaceWith("io.appwrite.services.CreateMFAChallenge"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun createMfaChallenge( factor: io.appwrite.enums.AuthenticationFactor, @@ -474,6 +611,37 @@ class Account(client: Client) : Service(client) { ) } + /** + * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. + * + * @param factor Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`. + * @return [io.appwrite.models.MfaChallenge] + */ + @Throws(AppwriteException::class) + suspend fun createMFAChallenge( + factor: io.appwrite.enums.AuthenticationFactor, + ): io.appwrite.models.MfaChallenge { + val apiPath = "/account/mfa/challenge" + + val apiParams = mutableMapOf( + "factor" to factor, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.MfaChallenge = { + io.appwrite.models.MfaChallenge.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.MfaChallenge::class.java, + converter, + ) + } + /** * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. * @@ -481,6 +649,11 @@ class Account(client: Client) : Service(client) { * @param otp Valid verification token. * @return [io.appwrite.models.Session] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `UpdateMFAChallenge` instead.", + replaceWith = ReplaceWith("io.appwrite.services.UpdateMFAChallenge"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun updateMfaChallenge( challengeId: String, @@ -508,11 +681,50 @@ class Account(client: Client) : Service(client) { ) } + /** + * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. + * + * @param challengeId ID of the challenge. + * @param otp Valid verification token. + * @return [io.appwrite.models.Session] + */ + @Throws(AppwriteException::class) + suspend fun updateMFAChallenge( + challengeId: String, + otp: String, + ): io.appwrite.models.Session { + val apiPath = "/account/mfa/challenge" + + val apiParams = mutableMapOf( + "challengeId" to challengeId, + "otp" to otp, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Session = { + io.appwrite.models.Session.from(map = it as Map) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Session::class.java, + converter, + ) + } + /** * List the factors available on the account to be used as a MFA challange. * * @return [io.appwrite.models.MfaFactors] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `ListMFAFactors` instead.", + replaceWith = ReplaceWith("io.appwrite.services.ListMFAFactors"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun listMfaFactors( ): io.appwrite.models.MfaFactors { @@ -535,11 +747,43 @@ class Account(client: Client) : Service(client) { ) } + /** + * List the factors available on the account to be used as a MFA challange. + * + * @return [io.appwrite.models.MfaFactors] + */ + @Throws(AppwriteException::class) + suspend fun listMFAFactors( + ): io.appwrite.models.MfaFactors { + val apiPath = "/account/mfa/factors" + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.MfaFactors = { + io.appwrite.models.MfaFactors.from(map = it as Map) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.MfaFactors::class.java, + converter, + ) + } + /** * Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes. * * @return [io.appwrite.models.MfaRecoveryCodes] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `GetMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.GetMFARecoveryCodes"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun getMfaRecoveryCodes( ): io.appwrite.models.MfaRecoveryCodes { @@ -563,11 +807,43 @@ class Account(client: Client) : Service(client) { } /** - * Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. + * Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes. * * @return [io.appwrite.models.MfaRecoveryCodes] */ @Throws(AppwriteException::class) + suspend fun getMFARecoveryCodes( + ): io.appwrite.models.MfaRecoveryCodes { + val apiPath = "/account/mfa/recovery-codes" + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { + io.appwrite.models.MfaRecoveryCodes.from(map = it as Map) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.MfaRecoveryCodes::class.java, + converter, + ) + } + + /** + * Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. + * + * @return [io.appwrite.models.MfaRecoveryCodes] + */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `CreateMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.CreateMFARecoveryCodes"), + since = "1.8.0" + ) + @Throws(AppwriteException::class) suspend fun createMfaRecoveryCodes( ): io.appwrite.models.MfaRecoveryCodes { val apiPath = "/account/mfa/recovery-codes" @@ -590,11 +866,44 @@ class Account(client: Client) : Service(client) { ) } + /** + * Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. + * + * @return [io.appwrite.models.MfaRecoveryCodes] + */ + @Throws(AppwriteException::class) + suspend fun createMFARecoveryCodes( + ): io.appwrite.models.MfaRecoveryCodes { + val apiPath = "/account/mfa/recovery-codes" + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { + io.appwrite.models.MfaRecoveryCodes.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.MfaRecoveryCodes::class.java, + converter, + ) + } + /** * Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes. * * @return [io.appwrite.models.MfaRecoveryCodes] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `UpdateMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.UpdateMFARecoveryCodes"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun updateMfaRecoveryCodes( ): io.appwrite.models.MfaRecoveryCodes { @@ -618,6 +927,34 @@ class Account(client: Client) : Service(client) { ) } + /** + * Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes. + * + * @return [io.appwrite.models.MfaRecoveryCodes] + */ + @Throws(AppwriteException::class) + suspend fun updateMFARecoveryCodes( + ): io.appwrite.models.MfaRecoveryCodes { + val apiPath = "/account/mfa/recovery-codes" + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { + io.appwrite.models.MfaRecoveryCodes.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.MfaRecoveryCodes::class.java, + converter, + ) + } + /** * Update currently logged in user account name. * @@ -719,7 +1056,7 @@ class Account(client: Client) : Service(client) { ) /** - * Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS. + * Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS. * * @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. * @param password User password. Must be at least 8 chars. @@ -856,7 +1193,7 @@ class Account(client: Client) : Service(client) { ) /** - * Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour. + * Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour. * * @param email User email. * @param url URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. @@ -890,7 +1227,9 @@ class Account(client: Client) : Service(client) { } /** - * Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint.Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. + * Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint. + * + * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * * @param userId User ID. * @param secret Valid reset token. @@ -1006,7 +1345,9 @@ class Account(client: Client) : Service(client) { } /** - * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param email User email. * @param password User password. Must be at least 8 chars. @@ -1148,7 +1489,7 @@ class Account(client: Client) : Service(client) { } /** - * Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used. + * Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used. * * @param sessionId Session ID. Use the string 'current' to get the current device session. * @return [io.appwrite.models.Session] @@ -1178,7 +1519,7 @@ class Account(client: Client) : Service(client) { } /** - * Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider. + * Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider. * * @param sessionId Session ID. Use the string 'current' to update the current device session. * @return [io.appwrite.models.Session] @@ -1209,7 +1550,7 @@ class Account(client: Client) : Service(client) { } /** - * Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead. + * Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead. * * @param sessionId Session ID. Use the string 'current' to delete the current device session. * @return [Any] @@ -1276,7 +1617,9 @@ class Account(client: Client) : Service(client) { ) /** - * Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param email User email. @@ -1314,7 +1657,10 @@ class Account(client: Client) : Service(client) { } /** - * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * * * @param userId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param email User email. @@ -1355,7 +1701,11 @@ class Account(client: Client) : Service(client) { } /** - * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. + * + * If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom. * @param success URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. @@ -1390,7 +1740,9 @@ class Account(client: Client) : Service(client) { } /** - * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param userId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. @@ -1424,7 +1776,10 @@ class Account(client: Client) : Service(client) { } /** - * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. + * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. + * + * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. + * * * @param url URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @return [io.appwrite.models.Token] @@ -1489,7 +1844,7 @@ class Account(client: Client) : Service(client) { } /** - * Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes. + * Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes. * * @return [io.appwrite.models.Token] */ @@ -1517,7 +1872,7 @@ class Account(client: Client) : Service(client) { } /** - * Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code. + * Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code. * * @param userId User ID. * @param secret Valid verification token. diff --git a/src/main/kotlin/io/appwrite/services/Avatars.kt b/src/main/kotlin/io/appwrite/services/Avatars.kt index e6f46737..9fbec1e0 100644 --- a/src/main/kotlin/io/appwrite/services/Avatars.kt +++ b/src/main/kotlin/io/appwrite/services/Avatars.kt @@ -16,7 +16,9 @@ import java.io.File class Avatars(client: Client) : Service(client) { /** - * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings. + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. * * @param code Browser Code. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -51,7 +53,10 @@ class Avatars(client: Client) : Service(client) { } /** - * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * * * @param code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -86,7 +91,9 @@ class Avatars(client: Client) : Service(client) { } /** - * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.This endpoint does not follow HTTP redirects. + * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL. + * + * This endpoint does not follow HTTP redirects. * * @param url Website URL which you want to fetch the favicon from. * @return [ByteArray] @@ -111,7 +118,10 @@ class Avatars(client: Client) : Service(client) { } /** - * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard. + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * * * @param code Country Code. ISO Alpha-2 country code format. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -146,7 +156,11 @@ class Avatars(client: Client) : Service(client) { } /** - * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.This endpoint does not follow HTTP redirects. + * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px. + * + * This endpoint does not follow HTTP redirects. * * @param url Image URL which you want to crop. * @param width Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400. @@ -178,7 +192,12 @@ class Avatars(client: Client) : Service(client) { } /** - * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned. + * + * You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * * * @param name Full Name. When empty, current user name or email will be used. Max length: 128 chars. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -214,6 +233,7 @@ class Avatars(client: Client) : Service(client) { /** * Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image. + * * * @param text Plain text to be converted to QR code image. * @param size QR code size. Pass an integer between 1 to 1000. Defaults to 400. diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index d7ff76c2..e852623b 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -21,8 +21,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.DatabaseList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.list` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.list"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.list` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.list"), since = "1.8.0" ) @JvmOverloads @@ -54,6 +54,7 @@ class Databases(client: Client) : Service(client) { /** * Create a new Database. + * * * @param databaseId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param name Database name. Max length: 128 chars. @@ -61,8 +62,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Database] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createDatabase` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createDatabase"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createDatabase` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createDatabase"), since = "1.8.0" ) @JvmOverloads @@ -102,8 +103,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Database] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.get` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.get"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.get` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.get"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -139,8 +140,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Database] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.update` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.update"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.update` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.update"), since = "1.8.0" ) @JvmOverloads @@ -180,8 +181,8 @@ class Databases(client: Client) : Service(client) { * @return [Any] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.delete` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.delete"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.delete` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.delete"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -214,8 +215,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.CollectionList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.listTables` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.listTables"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.listTables` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.listTables"), since = "1.8.0" ) @JvmOverloads @@ -259,8 +260,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Collection] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createTable` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createTable"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createTable` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createTable"), since = "1.8.0" ) @JvmOverloads @@ -307,8 +308,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Collection] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.getTable` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.getTable"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.getTable` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.getTable"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -349,8 +350,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Collection] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateTable` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateTable"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateTable` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateTable"), since = "1.8.0" ) @JvmOverloads @@ -397,8 +398,8 @@ class Databases(client: Client) : Service(client) { * @return [Any] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.deleteTable` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.deleteTable"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.deleteTable` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.deleteTable"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -433,8 +434,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.listColumns` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.listColumns"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.listColumns` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.listColumns"), since = "1.8.0" ) @JvmOverloads @@ -468,6 +469,7 @@ class Databases(client: Client) : Service(client) { /** * Create a boolean attribute. + * * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). @@ -478,8 +480,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeBoolean] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createBooleanColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createBooleanColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createBooleanColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createBooleanColumn"), since = "1.8.0" ) @JvmOverloads @@ -530,8 +532,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeBoolean] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateBooleanColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateBooleanColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateBooleanColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateBooleanColumn"), since = "1.8.0" ) @JvmOverloads @@ -582,8 +584,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeDatetime] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createDatetimeColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createDatetimeColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createDatetimeColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createDatetimeColumn"), since = "1.8.0" ) @JvmOverloads @@ -634,8 +636,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeDatetime] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateDatetimeColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateDatetimeColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateDatetimeColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateDatetimeColumn"), since = "1.8.0" ) @JvmOverloads @@ -676,6 +678,7 @@ class Databases(client: Client) : Service(client) { /** * Create an email attribute. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -686,8 +689,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeEmail] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createEmailColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createEmailColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createEmailColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createEmailColumn"), since = "1.8.0" ) @JvmOverloads @@ -728,6 +731,7 @@ class Databases(client: Client) : Service(client) { /** * Update an email attribute. Changing the `default` value will not update already existing documents. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -738,8 +742,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeEmail] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateEmailColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateEmailColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateEmailColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateEmailColumn"), since = "1.8.0" ) @JvmOverloads @@ -780,6 +784,7 @@ class Databases(client: Client) : Service(client) { /** * Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -791,8 +796,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeEnum] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createEnumColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createEnumColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createEnumColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createEnumColumn"), since = "1.8.0" ) @JvmOverloads @@ -835,6 +840,7 @@ class Databases(client: Client) : Service(client) { /** * Update an enum attribute. Changing the `default` value will not update already existing documents. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -846,8 +852,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeEnum] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateEnumColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateEnumColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateEnumColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateEnumColumn"), since = "1.8.0" ) @JvmOverloads @@ -890,6 +896,7 @@ class Databases(client: Client) : Service(client) { /** * Create a float attribute. Optionally, minimum and maximum values can be provided. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -902,8 +909,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeFloat] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createFloatColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createFloatColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createFloatColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createFloatColumn"), since = "1.8.0" ) @JvmOverloads @@ -948,6 +955,7 @@ class Databases(client: Client) : Service(client) { /** * Update a float attribute. Changing the `default` value will not update already existing documents. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -960,8 +968,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeFloat] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateFloatColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateFloatColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateFloatColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateFloatColumn"), since = "1.8.0" ) @JvmOverloads @@ -1006,6 +1014,7 @@ class Databases(client: Client) : Service(client) { /** * Create an integer attribute. Optionally, minimum and maximum values can be provided. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1018,8 +1027,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeInteger] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createIntegerColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createIntegerColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createIntegerColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createIntegerColumn"), since = "1.8.0" ) @JvmOverloads @@ -1064,6 +1073,7 @@ class Databases(client: Client) : Service(client) { /** * Update an integer attribute. Changing the `default` value will not update already existing documents. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1076,8 +1086,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeInteger] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateIntegerColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateIntegerColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateIntegerColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateIntegerColumn"), since = "1.8.0" ) @JvmOverloads @@ -1122,6 +1132,7 @@ class Databases(client: Client) : Service(client) { /** * Create IP address attribute. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1132,8 +1143,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeIp] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createIpColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createIpColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createIpColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createIpColumn"), since = "1.8.0" ) @JvmOverloads @@ -1174,6 +1185,7 @@ class Databases(client: Client) : Service(client) { /** * Update an ip attribute. Changing the `default` value will not update already existing documents. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1184,8 +1196,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeIp] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateIpColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateIpColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateIpColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateIpColumn"), since = "1.8.0" ) @JvmOverloads @@ -1226,6 +1238,7 @@ class Databases(client: Client) : Service(client) { /** * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1238,8 +1251,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeRelationship] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createRelationshipColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createRelationshipColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createRelationshipColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createRelationshipColumn"), since = "1.8.0" ) @JvmOverloads @@ -1284,6 +1297,7 @@ class Databases(client: Client) : Service(client) { /** * Create a string attribute. + * * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). @@ -1296,8 +1310,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeString] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createStringColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createStringColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createStringColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createStringColumn"), since = "1.8.0" ) @JvmOverloads @@ -1342,6 +1356,7 @@ class Databases(client: Client) : Service(client) { /** * Update a string attribute. Changing the `default` value will not update already existing documents. + * * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). @@ -1353,8 +1368,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeString] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateStringColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateStringColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateStringColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateStringColumn"), since = "1.8.0" ) @JvmOverloads @@ -1397,6 +1412,7 @@ class Databases(client: Client) : Service(client) { /** * Create a URL attribute. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1407,8 +1423,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeUrl] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createUrlColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createUrlColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createUrlColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createUrlColumn"), since = "1.8.0" ) @JvmOverloads @@ -1449,6 +1465,7 @@ class Databases(client: Client) : Service(client) { /** * Update an url attribute. Changing the `default` value will not update already existing documents. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1459,8 +1476,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeUrl] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateUrlColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateUrlColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateUrlColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateUrlColumn"), since = "1.8.0" ) @JvmOverloads @@ -1508,8 +1525,8 @@ class Databases(client: Client) : Service(client) { * @return [Any] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.getColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.getColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.getColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.getColumn"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1545,8 +1562,8 @@ class Databases(client: Client) : Service(client) { * @return [Any] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.deleteColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.deleteColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.deleteColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.deleteColumn"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1576,6 +1593,7 @@ class Databases(client: Client) : Service(client) { /** * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1585,8 +1603,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.AttributeRelationship] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateRelationshipColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateRelationshipColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateRelationshipColumn"), since = "1.8.0" ) @JvmOverloads @@ -1624,7 +1642,7 @@ class Databases(client: Client) : Service(client) { } /** - * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. + * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). @@ -1632,8 +1650,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.DocumentList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.listRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.listRows"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.listRows"), since = "1.8.0" ) @JvmOverloads @@ -1675,8 +1693,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.DocumentList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.listRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.listRows"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.listRows"), since = "1.8.0" ) @JvmOverloads @@ -1703,8 +1721,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Document] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createRow"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createRow"), since = "1.8.0" ) @JvmOverloads @@ -1753,8 +1771,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Document] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createRow"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createRow"), since = "1.8.0" ) @JvmOverloads @@ -1783,8 +1801,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.DocumentList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createRows"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createRows"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1826,8 +1844,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.DocumentList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createRows"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createRows"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1844,6 +1862,7 @@ class Databases(client: Client) : Service(client) { /** * Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1851,8 +1870,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.DocumentList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.upsertRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.upsertRows"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.upsertRows"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1894,8 +1913,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.DocumentList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.upsertRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.upsertRows"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.upsertRows"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1920,8 +1939,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.DocumentList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateRows"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateRows"), since = "1.8.0" ) @JvmOverloads @@ -1967,8 +1986,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.DocumentList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateRows"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateRows"), since = "1.8.0" ) @JvmOverloads @@ -1995,8 +2014,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.DocumentList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.deleteRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.deleteRows"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.deleteRows"), since = "1.8.0" ) @JvmOverloads @@ -2039,8 +2058,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.DocumentList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.deleteRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.deleteRows"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.deleteRows"), since = "1.8.0" ) @JvmOverloads @@ -2066,8 +2085,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Document] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.getRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.getRow"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.getRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.getRow"), since = "1.8.0" ) @JvmOverloads @@ -2112,8 +2131,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Document] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.getRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.getRow"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.getRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.getRow"), since = "1.8.0" ) @JvmOverloads @@ -2142,8 +2161,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Document] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.upsertRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.upsertRow"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.upsertRow"), since = "1.8.0" ) @JvmOverloads @@ -2192,8 +2211,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Document] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.upsertRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.upsertRow"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.upsertRow"), since = "1.8.0" ) @JvmOverloads @@ -2224,8 +2243,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Document] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateRow"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateRow"), since = "1.8.0" ) @JvmOverloads @@ -2274,8 +2293,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Document] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.updateRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.updateRow"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.updateRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.updateRow"), since = "1.8.0" ) @JvmOverloads @@ -2304,8 +2323,8 @@ class Databases(client: Client) : Service(client) { * @return [Any] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.deleteRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.deleteRow"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.deleteRow"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -2345,8 +2364,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Document] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.decrementRowColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.decrementRowColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.decrementRowColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.decrementRowColumn"), since = "1.8.0" ) @JvmOverloads @@ -2398,8 +2417,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Document] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.decrementRowColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.decrementRowColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.decrementRowColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.decrementRowColumn"), since = "1.8.0" ) @JvmOverloads @@ -2433,8 +2452,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Document] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.incrementRowColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.incrementRowColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.incrementRowColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.incrementRowColumn"), since = "1.8.0" ) @JvmOverloads @@ -2486,8 +2505,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Document] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.incrementRowColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.incrementRowColumn"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.incrementRowColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.incrementRowColumn"), since = "1.8.0" ) @JvmOverloads @@ -2518,8 +2537,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.IndexList] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.listIndexes` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.listIndexes"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.listIndexes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.listIndexes"), since = "1.8.0" ) @JvmOverloads @@ -2552,7 +2571,8 @@ class Databases(client: Client) : Service(client) { } /** - * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.Attributes can be `key`, `fulltext`, and `unique`. + * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. + * Attributes can be `key`, `fulltext`, and `unique`. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). @@ -2564,8 +2584,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Index] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.createIndex` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.createIndex"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.createIndex` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.createIndex"), since = "1.8.0" ) @JvmOverloads @@ -2615,8 +2635,8 @@ class Databases(client: Client) : Service(client) { * @return [io.appwrite.models.Index] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.getIndex` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.getIndex"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.getIndex` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.getIndex"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -2656,8 +2676,8 @@ class Databases(client: Client) : Service(client) { * @return [Any] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `TablesDb.deleteIndex` instead.", - replaceWith = ReplaceWith("io.appwrite.services.TablesDb.deleteIndex"), + message = "This API has been deprecated since 1.8.0. Please use `TablesDB.deleteIndex` instead.", + replaceWith = ReplaceWith("io.appwrite.services.TablesDB.deleteIndex"), since = "1.8.0" ) @Throws(AppwriteException::class) diff --git a/src/main/kotlin/io/appwrite/services/Functions.kt b/src/main/kotlin/io/appwrite/services/Functions.kt index 8e09dc9c..7b339705 100644 --- a/src/main/kotlin/io/appwrite/services/Functions.kt +++ b/src/main/kotlin/io/appwrite/services/Functions.kt @@ -16,7 +16,7 @@ import java.io.File class Functions(client: Client) : Service(client) { /** - * Get a list of all the project's functions. You can use the query params to filter your results. + * Get a list of all the project's functions. You can use the query params to filter your results. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId * @param search Search term to filter your list results. Max length: 256 chars. @@ -361,7 +361,7 @@ class Functions(client: Client) : Service(client) { } /** - * Get a list of all the function's code deployments. You can use the query params to filter your results. + * Get a list of all the function's code deployments. You can use the query params to filter your results. * * @param functionId Function ID. * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type @@ -398,7 +398,11 @@ class Functions(client: Client) : Service(client) { } /** - * Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).Use the "command" param to set the entrypoint used to execute your code. + * Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID. + * + * This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions). + * + * Use the "command" param to set the entrypoint used to execute your code. * * @param functionId Function ID. * @param code Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory. @@ -447,7 +451,7 @@ class Functions(client: Client) : Service(client) { } /** - * Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. + * Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. * * @param functionId Function ID. * @param deploymentId Deployment ID. @@ -485,7 +489,9 @@ class Functions(client: Client) : Service(client) { } /** - * Create a deployment based on a template.Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details. + * Create a deployment based on a template. + * + * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details. * * @param functionId Function ID. * @param repository Repository name of the template. @@ -532,7 +538,9 @@ class Functions(client: Client) : Service(client) { } /** - * Create a deployment when a function is connected to VCS.This endpoint lets you create deployment from a branch, commit, or a tag. + * Create a deployment when a function is connected to VCS. + * + * This endpoint lets you create deployment from a branch, commit, or a tag. * * @param functionId Function ID. * @param type Type of reference passed. Allowed values are: branch, commit @@ -636,7 +644,7 @@ class Functions(client: Client) : Service(client) { } /** - * Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. + * Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. * * @param functionId Function ID. * @param deploymentId Deployment ID. @@ -668,7 +676,7 @@ class Functions(client: Client) : Service(client) { } /** - * Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. + * Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. * * @param functionId Function ID. * @param deploymentId Deployment ID. diff --git a/src/main/kotlin/io/appwrite/services/Health.kt b/src/main/kotlin/io/appwrite/services/Health.kt index af44ef18..834ab02e 100644 --- a/src/main/kotlin/io/appwrite/services/Health.kt +++ b/src/main/kotlin/io/appwrite/services/Health.kt @@ -9,7 +9,7 @@ import okhttp3.Cookie import java.io.File /** - * The Health service allows you to both validate and monitor your Appwrite server's health. + * The Health service allows you to both validate and monitor your Appwrite server's health. **/ class Health(client: Client) : Service(client) { @@ -308,6 +308,7 @@ class Health(client: Client) : Service(client) { /** * Returns the amount of failed jobs in a given queue. + * * * @param name The name of the queue * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. diff --git a/src/main/kotlin/io/appwrite/services/Locale.kt b/src/main/kotlin/io/appwrite/services/Locale.kt index e598c0ba..435f182a 100644 --- a/src/main/kotlin/io/appwrite/services/Locale.kt +++ b/src/main/kotlin/io/appwrite/services/Locale.kt @@ -9,12 +9,14 @@ import okhttp3.Cookie import java.io.File /** - * The Locale service allows you to customize your app based on your users' location. + * The Locale service allows you to customize your app based on your users' location. **/ class Locale(client: Client) : Service(client) { /** - * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.([IP Geolocation by DB-IP](https://db-ip.com)) + * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. + * + * ([IP Geolocation by DB-IP](https://db-ip.com)) * * @return [io.appwrite.models.Locale] */ diff --git a/src/main/kotlin/io/appwrite/services/Messaging.kt b/src/main/kotlin/io/appwrite/services/Messaging.kt index f8cfcfff..27c0a6c6 100644 --- a/src/main/kotlin/io/appwrite/services/Messaging.kt +++ b/src/main/kotlin/io/appwrite/services/Messaging.kt @@ -114,6 +114,7 @@ class Messaging(client: Client) : Service(client) { /** * Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. + * * * @param messageId Message ID. * @param topics List of Topic IDs. @@ -265,6 +266,7 @@ class Messaging(client: Client) : Service(client) { /** * Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. + * * * @param messageId Message ID. * @param topics List of Topic IDs. @@ -361,6 +363,11 @@ class Messaging(client: Client) : Service(client) { * @param scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. * @return [io.appwrite.models.Message] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `CreateSMS` instead.", + replaceWith = ReplaceWith("io.appwrite.services.CreateSMS"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createSms( @@ -399,8 +406,59 @@ class Messaging(client: Client) : Service(client) { ) } + /** + * Create a new SMS message. + * + * @param messageId Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param content SMS Content. + * @param topics List of Topic IDs. + * @param users List of User IDs. + * @param targets List of Targets IDs. + * @param draft Is message a draft + * @param scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. + * @return [io.appwrite.models.Message] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createSMS( + messageId: String, + content: String, + topics: List? = null, + users: List? = null, + targets: List? = null, + draft: Boolean? = null, + scheduledAt: String? = null, + ): io.appwrite.models.Message { + val apiPath = "/messaging/messages/sms" + + val apiParams = mutableMapOf( + "messageId" to messageId, + "content" to content, + "topics" to topics, + "users" to users, + "targets" to targets, + "draft" to draft, + "scheduledAt" to scheduledAt, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Message = { + io.appwrite.models.Message.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Message::class.java, + converter, + ) + } + /** * Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. + * * * @param messageId Message ID. * @param topics List of Topic IDs. @@ -411,6 +469,11 @@ class Messaging(client: Client) : Service(client) { * @param scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. * @return [io.appwrite.models.Message] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `UpdateSMS` instead.", + replaceWith = ReplaceWith("io.appwrite.services.UpdateSMS"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateSms( @@ -449,8 +512,60 @@ class Messaging(client: Client) : Service(client) { ) } + /** + * Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. + * + * + * @param messageId Message ID. + * @param topics List of Topic IDs. + * @param users List of User IDs. + * @param targets List of Targets IDs. + * @param content Email Content. + * @param draft Is message a draft + * @param scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. + * @return [io.appwrite.models.Message] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateSMS( + messageId: String, + topics: List? = null, + users: List? = null, + targets: List? = null, + content: String? = null, + draft: Boolean? = null, + scheduledAt: String? = null, + ): io.appwrite.models.Message { + val apiPath = "/messaging/messages/sms/{messageId}" + .replace("{messageId}", messageId) + + val apiParams = mutableMapOf( + "topics" to topics, + "users" to users, + "targets" to targets, + "content" to content, + "draft" to draft, + "scheduledAt" to scheduledAt, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Message = { + io.appwrite.models.Message.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Message::class.java, + converter, + ) + } + /** * Get a message by its unique ID. + * * * @param messageId Message ID. * @return [io.appwrite.models.Message] @@ -621,6 +736,11 @@ class Messaging(client: Client) : Service(client) { * @param enabled Set as enabled. * @return [io.appwrite.models.Provider] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `CreateAPNSProvider` instead.", + replaceWith = ReplaceWith("io.appwrite.services.CreateAPNSProvider"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createApnsProvider( @@ -661,6 +781,59 @@ class Messaging(client: Client) : Service(client) { ) } + /** + * Create a new Apple Push Notification service provider. + * + * @param providerId Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param name Provider name. + * @param authKey APNS authentication key. + * @param authKeyId APNS authentication key ID. + * @param teamId APNS team ID. + * @param bundleId APNS bundle ID. + * @param sandbox Use APNS sandbox environment. + * @param enabled Set as enabled. + * @return [io.appwrite.models.Provider] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createAPNSProvider( + providerId: String, + name: String, + authKey: String? = null, + authKeyId: String? = null, + teamId: String? = null, + bundleId: String? = null, + sandbox: Boolean? = null, + enabled: Boolean? = null, + ): io.appwrite.models.Provider { + val apiPath = "/messaging/providers/apns" + + val apiParams = mutableMapOf( + "providerId" to providerId, + "name" to name, + "authKey" to authKey, + "authKeyId" to authKeyId, + "teamId" to teamId, + "bundleId" to bundleId, + "sandbox" to sandbox, + "enabled" to enabled, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Provider = { + io.appwrite.models.Provider.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Provider::class.java, + converter, + ) + } + /** * Update a Apple Push Notification service provider by its unique ID. * @@ -674,6 +847,11 @@ class Messaging(client: Client) : Service(client) { * @param sandbox Use APNS sandbox environment. * @return [io.appwrite.models.Provider] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `UpdateAPNSProvider` instead.", + replaceWith = ReplaceWith("io.appwrite.services.UpdateAPNSProvider"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateApnsProvider( @@ -714,6 +892,59 @@ class Messaging(client: Client) : Service(client) { ) } + /** + * Update a Apple Push Notification service provider by its unique ID. + * + * @param providerId Provider ID. + * @param name Provider name. + * @param enabled Set as enabled. + * @param authKey APNS authentication key. + * @param authKeyId APNS authentication key ID. + * @param teamId APNS team ID. + * @param bundleId APNS bundle ID. + * @param sandbox Use APNS sandbox environment. + * @return [io.appwrite.models.Provider] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateAPNSProvider( + providerId: String, + name: String? = null, + enabled: Boolean? = null, + authKey: String? = null, + authKeyId: String? = null, + teamId: String? = null, + bundleId: String? = null, + sandbox: Boolean? = null, + ): io.appwrite.models.Provider { + val apiPath = "/messaging/providers/apns/{providerId}" + .replace("{providerId}", providerId) + + val apiParams = mutableMapOf( + "name" to name, + "enabled" to enabled, + "authKey" to authKey, + "authKeyId" to authKeyId, + "teamId" to teamId, + "bundleId" to bundleId, + "sandbox" to sandbox, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Provider = { + io.appwrite.models.Provider.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Provider::class.java, + converter, + ) + } + /** * Create a new Firebase Cloud Messaging provider. * @@ -723,6 +954,11 @@ class Messaging(client: Client) : Service(client) { * @param enabled Set as enabled. * @return [io.appwrite.models.Provider] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `CreateFCMProvider` instead.", + replaceWith = ReplaceWith("io.appwrite.services.CreateFCMProvider"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createFcmProvider( @@ -755,6 +991,47 @@ class Messaging(client: Client) : Service(client) { ) } + /** + * Create a new Firebase Cloud Messaging provider. + * + * @param providerId Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param name Provider name. + * @param serviceAccountJSON FCM service account JSON. + * @param enabled Set as enabled. + * @return [io.appwrite.models.Provider] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createFCMProvider( + providerId: String, + name: String, + serviceAccountJSON: Any? = null, + enabled: Boolean? = null, + ): io.appwrite.models.Provider { + val apiPath = "/messaging/providers/fcm" + + val apiParams = mutableMapOf( + "providerId" to providerId, + "name" to name, + "serviceAccountJSON" to serviceAccountJSON, + "enabled" to enabled, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Provider = { + io.appwrite.models.Provider.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Provider::class.java, + converter, + ) + } + /** * Update a Firebase Cloud Messaging provider by its unique ID. * @@ -764,6 +1041,11 @@ class Messaging(client: Client) : Service(client) { * @param serviceAccountJSON FCM service account JSON. * @return [io.appwrite.models.Provider] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `UpdateFCMProvider` instead.", + replaceWith = ReplaceWith("io.appwrite.services.UpdateFCMProvider"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateFcmProvider( @@ -796,6 +1078,47 @@ class Messaging(client: Client) : Service(client) { ) } + /** + * Update a Firebase Cloud Messaging provider by its unique ID. + * + * @param providerId Provider ID. + * @param name Provider name. + * @param enabled Set as enabled. + * @param serviceAccountJSON FCM service account JSON. + * @return [io.appwrite.models.Provider] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateFCMProvider( + providerId: String, + name: String? = null, + enabled: Boolean? = null, + serviceAccountJSON: Any? = null, + ): io.appwrite.models.Provider { + val apiPath = "/messaging/providers/fcm/{providerId}" + .replace("{providerId}", providerId) + + val apiParams = mutableMapOf( + "name" to name, + "enabled" to enabled, + "serviceAccountJSON" to serviceAccountJSON, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Provider = { + io.appwrite.models.Provider.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Provider::class.java, + converter, + ) + } + /** * Create a new Mailgun provider. * @@ -1133,6 +1456,11 @@ class Messaging(client: Client) : Service(client) { * @param enabled Set as enabled. * @return [io.appwrite.models.Provider] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `CreateSMTPProvider` instead.", + replaceWith = ReplaceWith("io.appwrite.services.CreateSMTPProvider"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createSmtpProvider( @@ -1185,6 +1513,77 @@ class Messaging(client: Client) : Service(client) { ) } + /** + * Create a new SMTP provider. + * + * @param providerId Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param name Provider name. + * @param host SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order. + * @param port The default SMTP server port. + * @param username Authentication username. + * @param password Authentication password. + * @param encryption Encryption type. Can be omitted, 'ssl', or 'tls' + * @param autoTLS Enable SMTP AutoTLS feature. + * @param mailer The value to use for the X-Mailer header. + * @param fromName Sender Name. + * @param fromEmail Sender email address. + * @param replyToName Name set in the reply to field for the mail. Default value is sender name. + * @param replyToEmail Email set in the reply to field for the mail. Default value is sender email. + * @param enabled Set as enabled. + * @return [io.appwrite.models.Provider] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createSMTPProvider( + providerId: String, + name: String, + host: String, + port: Long? = null, + username: String? = null, + password: String? = null, + encryption: io.appwrite.enums.SmtpEncryption? = null, + autoTLS: Boolean? = null, + mailer: String? = null, + fromName: String? = null, + fromEmail: String? = null, + replyToName: String? = null, + replyToEmail: String? = null, + enabled: Boolean? = null, + ): io.appwrite.models.Provider { + val apiPath = "/messaging/providers/smtp" + + val apiParams = mutableMapOf( + "providerId" to providerId, + "name" to name, + "host" to host, + "port" to port, + "username" to username, + "password" to password, + "encryption" to encryption, + "autoTLS" to autoTLS, + "mailer" to mailer, + "fromName" to fromName, + "fromEmail" to fromEmail, + "replyToName" to replyToName, + "replyToEmail" to replyToEmail, + "enabled" to enabled, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Provider = { + io.appwrite.models.Provider.from(map = it as Map) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Provider::class.java, + converter, + ) + } + /** * Update a SMTP provider by its unique ID. * @@ -1204,6 +1603,11 @@ class Messaging(client: Client) : Service(client) { * @param enabled Set as enabled. * @return [io.appwrite.models.Provider] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `UpdateSMTPProvider` instead.", + replaceWith = ReplaceWith("io.appwrite.services.UpdateSMTPProvider"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateSmtpProvider( @@ -1256,6 +1660,77 @@ class Messaging(client: Client) : Service(client) { ) } + /** + * Update a SMTP provider by its unique ID. + * + * @param providerId Provider ID. + * @param name Provider name. + * @param host SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order. + * @param port SMTP port. + * @param username Authentication username. + * @param password Authentication password. + * @param encryption Encryption type. Can be 'ssl' or 'tls' + * @param autoTLS Enable SMTP AutoTLS feature. + * @param mailer The value to use for the X-Mailer header. + * @param fromName Sender Name. + * @param fromEmail Sender email address. + * @param replyToName Name set in the Reply To field for the mail. Default value is Sender Name. + * @param replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email. + * @param enabled Set as enabled. + * @return [io.appwrite.models.Provider] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateSMTPProvider( + providerId: String, + name: String? = null, + host: String? = null, + port: Long? = null, + username: String? = null, + password: String? = null, + encryption: io.appwrite.enums.SmtpEncryption? = null, + autoTLS: Boolean? = null, + mailer: String? = null, + fromName: String? = null, + fromEmail: String? = null, + replyToName: String? = null, + replyToEmail: String? = null, + enabled: Boolean? = null, + ): io.appwrite.models.Provider { + val apiPath = "/messaging/providers/smtp/{providerId}" + .replace("{providerId}", providerId) + + val apiParams = mutableMapOf( + "name" to name, + "host" to host, + "port" to port, + "username" to username, + "password" to password, + "encryption" to encryption, + "autoTLS" to autoTLS, + "mailer" to mailer, + "fromName" to fromName, + "fromEmail" to fromEmail, + "replyToName" to replyToName, + "replyToEmail" to replyToEmail, + "enabled" to enabled, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Provider = { + io.appwrite.models.Provider.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Provider::class.java, + converter, + ) + } + /** * Create a new Telesign provider. * @@ -1634,6 +2109,7 @@ class Messaging(client: Client) : Service(client) { /** * Get a provider by its unique ID. + * * * @param providerId Provider ID. * @return [io.appwrite.models.Provider] @@ -1831,6 +2307,7 @@ class Messaging(client: Client) : Service(client) { /** * Get a topic by its unique ID. + * * * @param topicId Topic ID. * @return [io.appwrite.models.Topic] @@ -1861,6 +2338,7 @@ class Messaging(client: Client) : Service(client) { /** * Update a topic by its unique ID. + * * * @param topicId Topic ID. * @param name Topic Name. @@ -2034,6 +2512,7 @@ class Messaging(client: Client) : Service(client) { /** * Get a subscriber by its unique ID. + * * * @param topicId Topic ID. The topic ID subscribed to. * @param subscriberId Subscriber ID. diff --git a/src/main/kotlin/io/appwrite/services/Sites.kt b/src/main/kotlin/io/appwrite/services/Sites.kt index 07aff05c..a57cff58 100644 --- a/src/main/kotlin/io/appwrite/services/Sites.kt +++ b/src/main/kotlin/io/appwrite/services/Sites.kt @@ -16,7 +16,7 @@ import java.io.File class Sites(client: Client) : Service(client) { /** - * Get a list of all the project's sites. You can use the query params to filter your results. + * Get a list of all the project's sites. You can use the query params to filter your results. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId * @param search Search term to filter your list results. Max length: 256 chars. @@ -361,7 +361,7 @@ class Sites(client: Client) : Service(client) { } /** - * Get a list of all the site's code deployments. You can use the query params to filter your results. + * Get a list of all the site's code deployments. You can use the query params to filter your results. * * @param siteId Site ID. * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type @@ -398,7 +398,7 @@ class Sites(client: Client) : Service(client) { } /** - * Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID. + * Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID. * * @param siteId Site ID. * @param code Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory. @@ -450,7 +450,7 @@ class Sites(client: Client) : Service(client) { } /** - * Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. + * Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. * * @param siteId Site ID. * @param deploymentId Deployment ID. @@ -484,7 +484,9 @@ class Sites(client: Client) : Service(client) { } /** - * Create a deployment based on a template.Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details. + * Create a deployment based on a template. + * + * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details. * * @param siteId Site ID. * @param repository Repository name of the template. @@ -531,7 +533,9 @@ class Sites(client: Client) : Service(client) { } /** - * Create a deployment when a site is connected to VCS.This endpoint lets you create deployment from a branch, commit, or a tag. + * Create a deployment when a site is connected to VCS. + * + * This endpoint lets you create deployment from a branch, commit, or a tag. * * @param siteId Site ID. * @param type Type of reference passed. Allowed values are: branch, commit @@ -635,7 +639,7 @@ class Sites(client: Client) : Service(client) { } /** - * Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. + * Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. * * @param siteId Site ID. * @param deploymentId Deployment ID. @@ -667,7 +671,7 @@ class Sites(client: Client) : Service(client) { } /** - * Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. + * Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. * * @param siteId Site ID. * @param deploymentId Deployment ID. diff --git a/src/main/kotlin/io/appwrite/services/Storage.kt b/src/main/kotlin/io/appwrite/services/Storage.kt index f319359c..fcaae571 100644 --- a/src/main/kotlin/io/appwrite/services/Storage.kt +++ b/src/main/kotlin/io/appwrite/services/Storage.kt @@ -262,7 +262,14 @@ class Storage(client: Client) : Service(client) { } /** - * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. + * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console. + * + * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes. + * + * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one. + * + * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. + * * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @param fileId File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -412,7 +419,7 @@ class Storage(client: Client) : Service(client) { } /** - * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. + * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. * * @param bucketId Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @param fileId File ID. @@ -509,7 +516,7 @@ class Storage(client: Client) : Service(client) { } /** - * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. + * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @param fileId File ID. diff --git a/src/main/kotlin/io/appwrite/services/TablesDb.kt b/src/main/kotlin/io/appwrite/services/TablesDb.kt index 6f0d25b2..9503625a 100644 --- a/src/main/kotlin/io/appwrite/services/TablesDb.kt +++ b/src/main/kotlin/io/appwrite/services/TablesDb.kt @@ -11,7 +11,7 @@ import java.io.File /** * **/ -class TablesDb(client: Client) : Service(client) { +class TablesDB(client: Client) : Service(client) { /** * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. @@ -49,6 +49,7 @@ class TablesDb(client: Client) : Service(client) { /** * Create a new Database. + * * * @param databaseId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param name Database name. Max length: 128 chars. @@ -218,7 +219,7 @@ class TablesDb(client: Client) : Service(client) { } /** - * Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console. * * @param databaseId Database ID. * @param tableId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -413,9 +414,10 @@ class TablesDb(client: Client) : Service(client) { /** * Create a boolean column. + * * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param key Column Key. * @param required Is column required? * @param default Default value for column when not provided. Cannot be set when column is required. @@ -462,7 +464,7 @@ class TablesDb(client: Client) : Service(client) { * Update a boolean column. Changing the `default` value will not update already existing rows. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param key Column Key. * @param required Is column required? * @param default Default value for column when not provided. Cannot be set when column is required. @@ -601,6 +603,7 @@ class TablesDb(client: Client) : Service(client) { /** * Create an email column. + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -648,6 +651,7 @@ class TablesDb(client: Client) : Service(client) { /** * Update an email column. Changing the `default` value will not update already existing rows. + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -745,6 +749,7 @@ class TablesDb(client: Client) : Service(client) { /** * Update an enum column. Changing the `default` value will not update already existing rows. + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -795,6 +800,7 @@ class TablesDb(client: Client) : Service(client) { /** * Create a float column. Optionally, minimum and maximum values can be provided. + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -848,6 +854,7 @@ class TablesDb(client: Client) : Service(client) { /** * Update a float column. Changing the `default` value will not update already existing rows. + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -901,6 +908,7 @@ class TablesDb(client: Client) : Service(client) { /** * Create an integer column. Optionally, minimum and maximum values can be provided. + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -954,6 +962,7 @@ class TablesDb(client: Client) : Service(client) { /** * Update an integer column. Changing the `default` value will not update already existing rows. + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1007,6 +1016,7 @@ class TablesDb(client: Client) : Service(client) { /** * Create IP address column. + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1054,6 +1064,7 @@ class TablesDb(client: Client) : Service(client) { /** * Update an ip column. Changing the `default` value will not update already existing rows. + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1101,6 +1112,7 @@ class TablesDb(client: Client) : Service(client) { /** * Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1154,9 +1166,10 @@ class TablesDb(client: Client) : Service(client) { /** * Create a string column. + * * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param key Column Key. * @param size Attribute size for text attributes, in number of characters. * @param required Is column required? @@ -1207,9 +1220,10 @@ class TablesDb(client: Client) : Service(client) { /** * Update a string column. Changing the `default` value will not update already existing rows. + * * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param key Column Key. * @param required Is column required? * @param default Default value for column when not provided. Cannot be set when column is required. @@ -1257,6 +1271,7 @@ class TablesDb(client: Client) : Service(client) { /** * Create a URL column. + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1304,6 +1319,7 @@ class TablesDb(client: Client) : Service(client) { /** * Update an url column. Changing the `default` value will not update already existing rows. + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1416,6 +1432,7 @@ class TablesDb(client: Client) : Service(client) { /** * Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1462,7 +1479,7 @@ class TablesDb(client: Client) : Service(client) { * List indexes on the table. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error * @return [io.appwrite.models.ColumnIndexList] */ @@ -1496,10 +1513,11 @@ class TablesDb(client: Client) : Service(client) { } /** - * Creates an index on the columns listed. Your index should include all the columns you will query in a single request.Type can be `key`, `fulltext`, or `unique`. + * Creates an index on the columns listed. Your index should include all the columns you will query in a single request. + * Type can be `key`, `fulltext`, or `unique`. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param key Index Key. * @param type Index type. * @param columns Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long. @@ -1549,7 +1567,7 @@ class TablesDb(client: Client) : Service(client) { * Get index by ID. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param key Index Key. * @return [io.appwrite.models.ColumnIndex] */ @@ -1585,7 +1603,7 @@ class TablesDb(client: Client) : Service(client) { * Delete an index. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param key Index Key. * @return [Any] */ @@ -1615,10 +1633,10 @@ class TablesDb(client: Client) : Service(client) { } /** - * Get a list of all the user's rows in a given table. You can use the query params to filter your results. + * Get a list of all the user's rows in a given table. You can use the query params to filter your results. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the TableDB service [server integration](https://appwrite.io/docs/server/tablesdbdb#tablesdbCreate). * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.RowList] */ @@ -1656,7 +1674,7 @@ class TablesDb(client: Client) : Service(client) { * Get a list of all the user's rows in a given table. You can use the query params to filter your results. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the TableDB service [server integration](https://appwrite.io/docs/server/tablesdbdb#tablesdbCreate). * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.RowList] */ @@ -1674,10 +1692,10 @@ class TablesDb(client: Client) : Service(client) { ) /** - * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows. * @param rowId Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param data Row data as JSON object. * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). @@ -1719,10 +1737,10 @@ class TablesDb(client: Client) : Service(client) { } /** - * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows. * @param rowId Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param data Row data as JSON object. * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). @@ -1746,10 +1764,10 @@ class TablesDb(client: Client) : Service(client) { ) /** - * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows. * @param rows Array of documents data as JSON objects. * @return [io.appwrite.models.RowList] */ @@ -1784,10 +1802,10 @@ class TablesDb(client: Client) : Service(client) { } /** - * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows. * @param rows Array of documents data as JSON objects. * @return [io.appwrite.models.RowList] */ @@ -1804,7 +1822,8 @@ class TablesDb(client: Client) : Service(client) { ) /** - * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console. + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1842,7 +1861,7 @@ class TablesDb(client: Client) : Service(client) { } /** - * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console. * * @param databaseId Database ID. * @param tableId Table ID. @@ -1931,7 +1950,7 @@ class TablesDb(client: Client) : Service(client) { * Bulk delete rows using queries, if no queries are passed then all rows are deleted. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.RowList] */ @@ -1970,7 +1989,7 @@ class TablesDb(client: Client) : Service(client) { * Bulk delete rows using queries, if no queries are passed then all rows are deleted. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.RowList] */ @@ -1991,7 +2010,7 @@ class TablesDb(client: Client) : Service(client) { * Get a row by its unique ID. This endpoint response returns a JSON object with the row data. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param rowId Row ID. * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.Row] @@ -2032,7 +2051,7 @@ class TablesDb(client: Client) : Service(client) { * Get a row by its unique ID. This endpoint response returns a JSON object with the row data. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param rowId Row ID. * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. * @return [io.appwrite.models.Row] @@ -2053,7 +2072,7 @@ class TablesDb(client: Client) : Service(client) { ) /** - * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console. * * @param databaseId Database ID. * @param tableId Table ID. @@ -2098,7 +2117,7 @@ class TablesDb(client: Client) : Service(client) { } /** - * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console. * * @param databaseId Database ID. * @param tableId Table ID. @@ -2200,7 +2219,7 @@ class TablesDb(client: Client) : Service(client) { * Delete a row by its unique ID. * * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param rowId Row ID. * @return [Any] */ diff --git a/src/main/kotlin/io/appwrite/services/Teams.kt b/src/main/kotlin/io/appwrite/services/Teams.kt index 9d601abc..5ad5d4f5 100644 --- a/src/main/kotlin/io/appwrite/services/Teams.kt +++ b/src/main/kotlin/io/appwrite/services/Teams.kt @@ -172,7 +172,7 @@ class Teams(client: Client) : Service(client) { ) /** - * Update the team's name by its unique ID. + * Update the team's name by its unique ID. * * @param teamId Team ID. * @param name New team name. Max length: 128 chars. @@ -251,7 +251,7 @@ class Teams(client: Client) : Service(client) { } /** - * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console. + * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console. * * @param teamId Team ID. * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles @@ -288,7 +288,14 @@ class Teams(client: Client) : Service(client) { } /** - * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. + * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. + * + * You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. + * + * Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. + * + * Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. + * * * @param teamId Team ID. * @param roles Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long. @@ -372,6 +379,7 @@ class Teams(client: Client) : Service(client) { /** * Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). + * * * @param teamId Team ID. * @param membershipId Membership ID. @@ -438,7 +446,10 @@ class Teams(client: Client) : Service(client) { } /** - * Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.If the request is successful, a session for the user is automatically created. + * Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user. + * + * If the request is successful, a session for the user is automatically created. + * * * @param teamId Team ID. * @param membershipId Membership ID. @@ -478,7 +489,7 @@ class Teams(client: Client) : Service(client) { } /** - * Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). + * Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). * * @param teamId Team ID. * @return [io.appwrite.models.Preferences] @@ -523,7 +534,7 @@ class Teams(client: Client) : Service(client) { ) /** - * Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. + * Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. * * @param teamId Team ID. * @param prefs Prefs key-value JSON object. diff --git a/src/main/kotlin/io/appwrite/services/Tokens.kt b/src/main/kotlin/io/appwrite/services/Tokens.kt index 7e485bdd..088b0698 100644 --- a/src/main/kotlin/io/appwrite/services/Tokens.kt +++ b/src/main/kotlin/io/appwrite/services/Tokens.kt @@ -119,7 +119,7 @@ class Tokens(client: Client) : Service(client) { } /** - * Update a token by its unique ID. Use this endpoint to update a token's expiry date. + * Update a token by its unique ID. Use this endpoint to update a token's expiry date. * * @param tokenId Token unique ID. * @param expire File token expiry date diff --git a/src/main/kotlin/io/appwrite/services/Users.kt b/src/main/kotlin/io/appwrite/services/Users.kt index 549e858c..6abf3cd8 100644 --- a/src/main/kotlin/io/appwrite/services/Users.kt +++ b/src/main/kotlin/io/appwrite/services/Users.kt @@ -14,7 +14,7 @@ import java.io.File class Users(client: Client) : Service(client) { /** - * Get a list of all the project's users. You can use the query params to filter your results. + * Get a list of all the project's users. You can use the query params to filter your results. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels * @param search Search term to filter your list results. Max length: 256 chars. @@ -761,7 +761,7 @@ class Users(client: Client) : Service(client) { ) /** - * Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead. + * Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead. * * @param userId User ID. * @return [Any] @@ -878,7 +878,9 @@ class Users(client: Client) : Service(client) { } /** - * Update the user labels by its unique ID. Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info. + * Update the user labels by its unique ID. + * + * Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info. * * @param userId User ID. * @param labels Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long. @@ -1007,6 +1009,11 @@ class Users(client: Client) : Service(client) { * @param mfa Enable or disable MFA. * @return [io.appwrite.models.User] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `UpdateMFA` instead.", + replaceWith = ReplaceWith("io.appwrite.services.UpdateMFA"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun updateMfa( userId: String, @@ -1042,6 +1049,11 @@ class Users(client: Client) : Service(client) { * @param mfa Enable or disable MFA. * @return [io.appwrite.models.User] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `UpdateMFA` instead.", + replaceWith = ReplaceWith("io.appwrite.services.UpdateMFA"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun updateMfa( userId: String, @@ -1052,6 +1064,58 @@ class Users(client: Client) : Service(client) { nestedType = classOf(), ) + /** + * Enable or disable MFA on a user account. + * + * @param userId User ID. + * @param mfa Enable or disable MFA. + * @return [io.appwrite.models.User] + */ + @Throws(AppwriteException::class) + suspend fun updateMFA( + userId: String, + mfa: Boolean, + nestedType: Class, + ): io.appwrite.models.User { + val apiPath = "/users/{userId}/mfa" + .replace("{userId}", userId) + + val apiParams = mutableMapOf( + "mfa" to mfa, + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.User = { + io.appwrite.models.User.from(map = it as Map, nestedType) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Enable or disable MFA on a user account. + * + * @param userId User ID. + * @param mfa Enable or disable MFA. + * @return [io.appwrite.models.User] + */ + @Throws(AppwriteException::class) + suspend fun updateMFA( + userId: String, + mfa: Boolean, + ): io.appwrite.models.User> = updateMFA( + userId, + mfa, + nestedType = classOf(), + ) + /** * Delete an authenticator app. * @@ -1059,6 +1123,11 @@ class Users(client: Client) : Service(client) { * @param type Type of authenticator. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `DeleteMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.DeleteMFAAuthenticator"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun deleteMfaAuthenticator( userId: String, @@ -1082,12 +1151,47 @@ class Users(client: Client) : Service(client) { ) } + /** + * Delete an authenticator app. + * + * @param userId User ID. + * @param type Type of authenticator. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun deleteMFAAuthenticator( + userId: String, + type: io.appwrite.enums.AuthenticatorType, + ): Any { + val apiPath = "/users/{userId}/mfa/authenticators/{type}" + .replace("{userId}", userId) + .replace("{type}", type.value) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + /** * List the factors available on the account to be used as a MFA challange. * * @param userId User ID. * @return [io.appwrite.models.MfaFactors] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `ListMFAFactors` instead.", + replaceWith = ReplaceWith("io.appwrite.services.ListMFAFactors"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun listMfaFactors( userId: String, @@ -1112,12 +1216,47 @@ class Users(client: Client) : Service(client) { ) } + /** + * List the factors available on the account to be used as a MFA challange. + * + * @param userId User ID. + * @return [io.appwrite.models.MfaFactors] + */ + @Throws(AppwriteException::class) + suspend fun listMFAFactors( + userId: String, + ): io.appwrite.models.MfaFactors { + val apiPath = "/users/{userId}/mfa/factors" + .replace("{userId}", userId) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.MfaFactors = { + io.appwrite.models.MfaFactors.from(map = it as Map) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.MfaFactors::class.java, + converter, + ) + } + /** * Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. * * @param userId User ID. * @return [io.appwrite.models.MfaRecoveryCodes] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `GetMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.GetMFARecoveryCodes"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun getMfaRecoveryCodes( userId: String, @@ -1142,12 +1281,47 @@ class Users(client: Client) : Service(client) { ) } + /** + * Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. + * + * @param userId User ID. + * @return [io.appwrite.models.MfaRecoveryCodes] + */ + @Throws(AppwriteException::class) + suspend fun getMFARecoveryCodes( + userId: String, + ): io.appwrite.models.MfaRecoveryCodes { + val apiPath = "/users/{userId}/mfa/recovery-codes" + .replace("{userId}", userId) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + ) + val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { + io.appwrite.models.MfaRecoveryCodes.from(map = it as Map) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.MfaRecoveryCodes::class.java, + converter, + ) + } + /** * Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. * * @param userId User ID. * @return [io.appwrite.models.MfaRecoveryCodes] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `UpdateMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.UpdateMFARecoveryCodes"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun updateMfaRecoveryCodes( userId: String, @@ -1173,12 +1347,48 @@ class Users(client: Client) : Service(client) { ) } + /** + * Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. + * + * @param userId User ID. + * @return [io.appwrite.models.MfaRecoveryCodes] + */ + @Throws(AppwriteException::class) + suspend fun updateMFARecoveryCodes( + userId: String, + ): io.appwrite.models.MfaRecoveryCodes { + val apiPath = "/users/{userId}/mfa/recovery-codes" + .replace("{userId}", userId) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { + io.appwrite.models.MfaRecoveryCodes.from(map = it as Map) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.MfaRecoveryCodes::class.java, + converter, + ) + } + /** * Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK. * * @param userId User ID. * @return [io.appwrite.models.MfaRecoveryCodes] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `CreateMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.CreateMFARecoveryCodes"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun createMfaRecoveryCodes( userId: String, @@ -1204,6 +1414,37 @@ class Users(client: Client) : Service(client) { ) } + /** + * Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK. + * + * @param userId User ID. + * @return [io.appwrite.models.MfaRecoveryCodes] + */ + @Throws(AppwriteException::class) + suspend fun createMFARecoveryCodes( + userId: String, + ): io.appwrite.models.MfaRecoveryCodes { + val apiPath = "/users/{userId}/mfa/recovery-codes" + .replace("{userId}", userId) + + val apiParams = mutableMapOf( + ) + val apiHeaders = mutableMapOf( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { + io.appwrite.models.MfaRecoveryCodes.from(map = it as Map) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.MfaRecoveryCodes::class.java, + converter, + ) + } + /** * Update the user name by its unique ID. * @@ -1488,7 +1729,9 @@ class Users(client: Client) : Service(client) { } /** - * Creates a session for a user. Returns an immediately usable session object.If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint. + * Creates a session for a user. Returns an immediately usable session object. + * + * If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @return [io.appwrite.models.Session] @@ -1519,7 +1762,7 @@ class Users(client: Client) : Service(client) { } /** - * Delete all user's sessions by using the user's unique ID. + * Delete all user's sessions by using the user's unique ID. * * @param userId User ID. * @return [Any] @@ -1576,7 +1819,7 @@ class Users(client: Client) : Service(client) { } /** - * Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved. + * Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved. * * @param userId User ID. * @param status User Status. To activate the user pass `true` and to block the user pass `false`. @@ -1709,7 +1952,7 @@ class Users(client: Client) : Service(client) { } /** - * Get a user's push notification target by ID. + * Get a user's push notification target by ID. * * @param userId User ID. * @param targetId Target ID. @@ -1817,6 +2060,7 @@ class Users(client: Client) : Service(client) { /** * Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. + * * * @param userId User ID. * @param length Token length in characters. The default length is 6 characters From 1754c024867d0cce4ceb332ec254e66a66c1a8d8 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 23 Aug 2025 20:13:30 +1200 Subject: [PATCH 5/7] Add 1.8.x support --- src/main/kotlin/io/appwrite/models/Execution.kt | 8 ++++++++ src/main/kotlin/io/appwrite/services/Account.kt | 9 +++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/io/appwrite/models/Execution.kt b/src/main/kotlin/io/appwrite/models/Execution.kt index 216e1460..c1525bc0 100644 --- a/src/main/kotlin/io/appwrite/models/Execution.kt +++ b/src/main/kotlin/io/appwrite/models/Execution.kt @@ -37,6 +37,12 @@ data class Execution( @SerializedName("functionId") val functionId: String, + /** + * Function's deployment ID used to create the execution. + */ + @SerializedName("deploymentId") + val deploymentId: String, + /** * The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`. */ @@ -116,6 +122,7 @@ data class Execution( "\$updatedAt" to updatedAt as Any, "\$permissions" to permissions as Any, "functionId" to functionId as Any, + "deploymentId" to deploymentId as Any, "trigger" to trigger as Any, "status" to status as Any, "requestMethod" to requestMethod as Any, @@ -141,6 +148,7 @@ data class Execution( updatedAt = map["\$updatedAt"] as String, permissions = map["\$permissions"] as List, functionId = map["functionId"] as String, + deploymentId = map["deploymentId"] as String, trigger = map["trigger"] as String, status = map["status"] as String, requestMethod = map["requestMethod"] as String, diff --git a/src/main/kotlin/io/appwrite/services/Account.kt b/src/main/kotlin/io/appwrite/services/Account.kt index 84fb4ab0..0fa23771 100644 --- a/src/main/kotlin/io/appwrite/services/Account.kt +++ b/src/main/kotlin/io/appwrite/services/Account.kt @@ -1617,11 +1617,12 @@ class Account(client: Client) : Service(client) { ) /** - * Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. + * Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * * - * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored. * @param email User email. * @param phrase Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow. * @return [io.appwrite.models.Token] @@ -1662,7 +1663,7 @@ class Account(client: Client) : Service(client) { * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * - * @param userId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param userId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored. * @param email User email. * @param url URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param phrase Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow. @@ -1744,7 +1745,7 @@ class Account(client: Client) : Service(client) { * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * - * @param userId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param userId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored. * @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. * @return [io.appwrite.models.Token] */ From e2f1dd5ab9afc9bdd165e96d31b2c371369c03a5 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 23 Aug 2025 22:18:44 +1200 Subject: [PATCH 6/7] Add 1.8.x support --- .../kotlin/io/appwrite/models/Collection.kt | 2 +- .../io/appwrite/models/ColumnBoolean.kt | 2 +- .../io/appwrite/models/ColumnDatetime.kt | 2 +- .../kotlin/io/appwrite/models/ColumnEmail.kt | 2 +- .../kotlin/io/appwrite/models/ColumnEnum.kt | 2 +- .../kotlin/io/appwrite/models/ColumnFloat.kt | 2 +- .../io/appwrite/models/ColumnInteger.kt | 2 +- .../kotlin/io/appwrite/models/ColumnIp.kt | 2 +- .../kotlin/io/appwrite/models/Database.kt | 2 +- .../kotlin/io/appwrite/models/Deployment.kt | 2 +- .../kotlin/io/appwrite/models/Execution.kt | 4 +- .../kotlin/io/appwrite/models/Function.kt | 8 +- src/main/kotlin/io/appwrite/models/Locale.kt | 2 +- src/main/kotlin/io/appwrite/models/Site.kt | 8 +- src/main/kotlin/io/appwrite/models/Table.kt | 2 +- .../kotlin/io/appwrite/models/Variable.kt | 4 +- .../kotlin/io/appwrite/services/Account.kt | 88 ++++++++++--------- .../kotlin/io/appwrite/services/Avatars.kt | 40 ++++----- .../kotlin/io/appwrite/services/Databases.kt | 43 ++++----- .../kotlin/io/appwrite/services/Functions.kt | 16 ++-- .../kotlin/io/appwrite/services/Health.kt | 2 +- .../kotlin/io/appwrite/services/Locale.kt | 4 +- .../kotlin/io/appwrite/services/Messaging.kt | 50 +++++------ src/main/kotlin/io/appwrite/services/Sites.kt | 8 +- .../kotlin/io/appwrite/services/Storage.kt | 14 +-- .../kotlin/io/appwrite/services/TablesDb.kt | 51 +++++------ src/main/kotlin/io/appwrite/services/Teams.kt | 28 +++--- src/main/kotlin/io/appwrite/services/Users.kt | 46 +++++----- 28 files changed, 222 insertions(+), 216 deletions(-) diff --git a/src/main/kotlin/io/appwrite/models/Collection.kt b/src/main/kotlin/io/appwrite/models/Collection.kt index 56b7b411..00cfa81d 100644 --- a/src/main/kotlin/io/appwrite/models/Collection.kt +++ b/src/main/kotlin/io/appwrite/models/Collection.kt @@ -44,7 +44,7 @@ data class Collection( val name: String, /** - * Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys. + * Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys. */ @SerializedName("enabled") val enabled: Boolean, diff --git a/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt b/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt index fc5c45e4..e55bb228 100644 --- a/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt +++ b/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt @@ -56,7 +56,7 @@ data class ColumnBoolean( val updatedAt: String, /** - * Default value for attribute when not provided. Cannot be set when attribute is required. + * Default value for column when not provided. Cannot be set when column is required. */ @SerializedName("default") var default: Boolean?, diff --git a/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt b/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt index 3c5c446b..fc35b86d 100644 --- a/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt +++ b/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt @@ -62,7 +62,7 @@ data class ColumnDatetime( val format: String, /** - * Default value for attribute when not provided. Only null is optional + * Default value for column when not provided. Only null is optional */ @SerializedName("default") var default: String?, diff --git a/src/main/kotlin/io/appwrite/models/ColumnEmail.kt b/src/main/kotlin/io/appwrite/models/ColumnEmail.kt index 43c9cf25..4e190f7e 100644 --- a/src/main/kotlin/io/appwrite/models/ColumnEmail.kt +++ b/src/main/kotlin/io/appwrite/models/ColumnEmail.kt @@ -62,7 +62,7 @@ data class ColumnEmail( val format: String, /** - * Default value for attribute when not provided. Cannot be set when attribute is required. + * Default value for column when not provided. Cannot be set when column is required. */ @SerializedName("default") var default: String?, diff --git a/src/main/kotlin/io/appwrite/models/ColumnEnum.kt b/src/main/kotlin/io/appwrite/models/ColumnEnum.kt index 717316b7..45244b19 100644 --- a/src/main/kotlin/io/appwrite/models/ColumnEnum.kt +++ b/src/main/kotlin/io/appwrite/models/ColumnEnum.kt @@ -68,7 +68,7 @@ data class ColumnEnum( val format: String, /** - * Default value for attribute when not provided. Cannot be set when attribute is required. + * Default value for column when not provided. Cannot be set when column is required. */ @SerializedName("default") var default: String?, diff --git a/src/main/kotlin/io/appwrite/models/ColumnFloat.kt b/src/main/kotlin/io/appwrite/models/ColumnFloat.kt index 92b7a2fb..77ec0244 100644 --- a/src/main/kotlin/io/appwrite/models/ColumnFloat.kt +++ b/src/main/kotlin/io/appwrite/models/ColumnFloat.kt @@ -68,7 +68,7 @@ data class ColumnFloat( var max: Double?, /** - * Default value for attribute when not provided. Cannot be set when attribute is required. + * Default value for column when not provided. Cannot be set when column is required. */ @SerializedName("default") var default: Double?, diff --git a/src/main/kotlin/io/appwrite/models/ColumnInteger.kt b/src/main/kotlin/io/appwrite/models/ColumnInteger.kt index 0545ec5d..a827bd11 100644 --- a/src/main/kotlin/io/appwrite/models/ColumnInteger.kt +++ b/src/main/kotlin/io/appwrite/models/ColumnInteger.kt @@ -68,7 +68,7 @@ data class ColumnInteger( var max: Long?, /** - * Default value for attribute when not provided. Cannot be set when attribute is required. + * Default value for column when not provided. Cannot be set when column is required. */ @SerializedName("default") var default: Long?, diff --git a/src/main/kotlin/io/appwrite/models/ColumnIp.kt b/src/main/kotlin/io/appwrite/models/ColumnIp.kt index dad7442e..b3741bb2 100644 --- a/src/main/kotlin/io/appwrite/models/ColumnIp.kt +++ b/src/main/kotlin/io/appwrite/models/ColumnIp.kt @@ -62,7 +62,7 @@ data class ColumnIp( val format: String, /** - * Default value for attribute when not provided. Cannot be set when attribute is required. + * Default value for column when not provided. Cannot be set when column is required. */ @SerializedName("default") var default: String?, diff --git a/src/main/kotlin/io/appwrite/models/Database.kt b/src/main/kotlin/io/appwrite/models/Database.kt index 8788a836..f40c5789 100644 --- a/src/main/kotlin/io/appwrite/models/Database.kt +++ b/src/main/kotlin/io/appwrite/models/Database.kt @@ -32,7 +32,7 @@ data class Database( val updatedAt: String, /** - * If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys. + * If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys. */ @SerializedName("enabled") val enabled: Boolean, diff --git a/src/main/kotlin/io/appwrite/models/Deployment.kt b/src/main/kotlin/io/appwrite/models/Deployment.kt index 17ee7705..9edb6542 100644 --- a/src/main/kotlin/io/appwrite/models/Deployment.kt +++ b/src/main/kotlin/io/appwrite/models/Deployment.kt @@ -92,7 +92,7 @@ data class Deployment( val screenshotDark: String, /** - * The deployment status. Possible values are "waiting", "processing", "building", "ready", and "failed". + * The deployment status. Possible values are "waiting", "processing", "building", "ready", and "failed". */ @SerializedName("status") val status: String, diff --git a/src/main/kotlin/io/appwrite/models/Execution.kt b/src/main/kotlin/io/appwrite/models/Execution.kt index c1525bc0..8b395c66 100644 --- a/src/main/kotlin/io/appwrite/models/Execution.kt +++ b/src/main/kotlin/io/appwrite/models/Execution.kt @@ -20,7 +20,7 @@ data class Execution( val createdAt: String, /** - * Execution upate date in ISO 8601 format. + * Execution update date in ISO 8601 format. */ @SerializedName("\$updatedAt") val updatedAt: String, @@ -38,7 +38,7 @@ data class Execution( val functionId: String, /** - * Function's deployment ID used to create the execution. + * Function's deployment ID used to create the execution. */ @SerializedName("deploymentId") val deploymentId: String, diff --git a/src/main/kotlin/io/appwrite/models/Function.kt b/src/main/kotlin/io/appwrite/models/Function.kt index f6c20e41..6cc111f3 100644 --- a/src/main/kotlin/io/appwrite/models/Function.kt +++ b/src/main/kotlin/io/appwrite/models/Function.kt @@ -44,7 +44,7 @@ data class Function( val enabled: Boolean, /** - * Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration. + * Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration. */ @SerializedName("live") val live: Boolean, @@ -62,7 +62,7 @@ data class Function( val runtime: String, /** - * Function's active deployment ID. + * Function's active deployment ID. */ @SerializedName("deploymentId") val deploymentId: String, @@ -74,7 +74,7 @@ data class Function( val deploymentCreatedAt: String, /** - * Function's latest deployment ID. + * Function's latest deployment ID. */ @SerializedName("latestDeploymentId") val latestDeploymentId: String, @@ -86,7 +86,7 @@ data class Function( val latestDeploymentCreatedAt: String, /** - * Status of latest deployment. Possible values are "waiting", "processing", "building", "ready", and "failed". + * Status of latest deployment. Possible values are "waiting", "processing", "building", "ready", and "failed". */ @SerializedName("latestDeploymentStatus") val latestDeploymentStatus: String, diff --git a/src/main/kotlin/io/appwrite/models/Locale.kt b/src/main/kotlin/io/appwrite/models/Locale.kt index abe4a0eb..93d28d4a 100644 --- a/src/main/kotlin/io/appwrite/models/Locale.kt +++ b/src/main/kotlin/io/appwrite/models/Locale.kt @@ -26,7 +26,7 @@ data class Locale( val country: String, /** - * Continent code. A two character continent code "AF" for Africa, "AN" for Antarctica, "AS" for Asia, "EU" for Europe, "NA" for North America, "OC" for Oceania, and "SA" for South America. + * Continent code. A two character continent code "AF" for Africa, "AN" for Antarctica, "AS" for Asia, "EU" for Europe, "NA" for North America, "OC" for Oceania, and "SA" for South America. */ @SerializedName("continentCode") val continentCode: String, diff --git a/src/main/kotlin/io/appwrite/models/Site.kt b/src/main/kotlin/io/appwrite/models/Site.kt index d3de7b05..c246ac13 100644 --- a/src/main/kotlin/io/appwrite/models/Site.kt +++ b/src/main/kotlin/io/appwrite/models/Site.kt @@ -38,7 +38,7 @@ data class Site( val enabled: Boolean, /** - * Is the site deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration. + * Is the site deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration. */ @SerializedName("live") val live: Boolean, @@ -56,7 +56,7 @@ data class Site( val framework: String, /** - * Site's active deployment ID. + * Site's active deployment ID. */ @SerializedName("deploymentId") val deploymentId: String, @@ -80,7 +80,7 @@ data class Site( val deploymentScreenshotDark: String, /** - * Site's latest deployment ID. + * Site's latest deployment ID. */ @SerializedName("latestDeploymentId") val latestDeploymentId: String, @@ -92,7 +92,7 @@ data class Site( val latestDeploymentCreatedAt: String, /** - * Status of latest deployment. Possible values are "waiting", "processing", "building", "ready", and "failed". + * Status of latest deployment. Possible values are "waiting", "processing", "building", "ready", and "failed". */ @SerializedName("latestDeploymentStatus") val latestDeploymentStatus: String, diff --git a/src/main/kotlin/io/appwrite/models/Table.kt b/src/main/kotlin/io/appwrite/models/Table.kt index 9b43c414..c741b437 100644 --- a/src/main/kotlin/io/appwrite/models/Table.kt +++ b/src/main/kotlin/io/appwrite/models/Table.kt @@ -44,7 +44,7 @@ data class Table( val name: String, /** - * Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys. + * Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys. */ @SerializedName("enabled") val enabled: Boolean, diff --git a/src/main/kotlin/io/appwrite/models/Variable.kt b/src/main/kotlin/io/appwrite/models/Variable.kt index 47518f15..992fcdf6 100644 --- a/src/main/kotlin/io/appwrite/models/Variable.kt +++ b/src/main/kotlin/io/appwrite/models/Variable.kt @@ -44,13 +44,13 @@ data class Variable( val secret: Boolean, /** - * Service to which the variable belongs. Possible values are "project", "function" + * Service to which the variable belongs. Possible values are "project", "function" */ @SerializedName("resourceType") val resourceType: String, /** - * ID of resource to which the variable belongs. If resourceType is "project", it is empty. If resourceType is "function", it is ID of the function. + * ID of resource to which the variable belongs. If resourceType is "project", it is empty. If resourceType is "function", it is ID of the function. */ @SerializedName("resourceId") val resourceId: String, diff --git a/src/main/kotlin/io/appwrite/services/Account.kt b/src/main/kotlin/io/appwrite/services/Account.kt index 0fa23771..ce9c501d 100644 --- a/src/main/kotlin/io/appwrite/services/Account.kt +++ b/src/main/kotlin/io/appwrite/services/Account.kt @@ -120,8 +120,8 @@ class Account(client: Client) : Service(client) { /** * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request. - * This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. - * + * This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. + * * * @param email User email. * @param password User password. Must be at least 8 chars. @@ -156,7 +156,9 @@ class Account(client: Client) : Service(client) { } /** - * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. + * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request. + * This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. + * * * @param email User email. * @param password User password. Must be at least 8 chars. @@ -342,8 +344,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.MfaType] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `CreateMFAAuthenticator` instead.", - replaceWith = ReplaceWith("io.appwrite.services.CreateMFAAuthenticator"), + message = "This API has been deprecated since 1.8.0. Please use `Account.createMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.createMFAAuthenticator"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -410,8 +412,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.User] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateMFAAuthenticator` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateMFAAuthenticator"), + message = "This API has been deprecated since 1.8.0. Please use `Account.updateMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.updateMFAAuthenticator"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -450,8 +452,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.User] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateMFAAuthenticator` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateMFAAuthenticator"), + message = "This API has been deprecated since 1.8.0. Please use `Account.updateMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.updateMFAAuthenticator"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -523,8 +525,8 @@ class Account(client: Client) : Service(client) { * @return [Any] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `DeleteMFAAuthenticator` instead.", - replaceWith = ReplaceWith("io.appwrite.services.DeleteMFAAuthenticator"), + message = "This API has been deprecated since 1.8.0. Please use `Account.deleteMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.deleteMFAAuthenticator"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -582,8 +584,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.MfaChallenge] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `CreateMFAChallenge` instead.", - replaceWith = ReplaceWith("io.appwrite.services.CreateMFAChallenge"), + message = "This API has been deprecated since 1.8.0. Please use `Account.createMFAChallenge` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.createMFAChallenge"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -650,8 +652,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.Session] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateMFAChallenge` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateMFAChallenge"), + message = "This API has been deprecated since 1.8.0. Please use `Account.updateMFAChallenge` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.updateMFAChallenge"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -721,8 +723,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.MfaFactors] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `ListMFAFactors` instead.", - replaceWith = ReplaceWith("io.appwrite.services.ListMFAFactors"), + message = "This API has been deprecated since 1.8.0. Please use `Account.listMFAFactors` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.listMFAFactors"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -780,8 +782,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.MfaRecoveryCodes] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `GetMFARecoveryCodes` instead.", - replaceWith = ReplaceWith("io.appwrite.services.GetMFARecoveryCodes"), + message = "This API has been deprecated since 1.8.0. Please use `Account.getMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.getMFARecoveryCodes"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -839,8 +841,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.MfaRecoveryCodes] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `CreateMFARecoveryCodes` instead.", - replaceWith = ReplaceWith("io.appwrite.services.CreateMFARecoveryCodes"), + message = "This API has been deprecated since 1.8.0. Please use `Account.createMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.createMFARecoveryCodes"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -900,8 +902,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.MfaRecoveryCodes] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateMFARecoveryCodes` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateMFARecoveryCodes"), + message = "This API has been deprecated since 1.8.0. Please use `Account.updateMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.updateMFARecoveryCodes"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1091,7 +1093,7 @@ class Account(client: Client) : Service(client) { } /** - * Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS. + * Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS. * * @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. * @param password User password. Must be at least 8 chars. @@ -1228,8 +1230,8 @@ class Account(client: Client) : Service(client) { /** * Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint. - * - * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. + * + * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * * @param userId User ID. * @param secret Valid reset token. @@ -1346,8 +1348,8 @@ class Account(client: Client) : Service(client) { /** * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. - * - * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param email User email. * @param password User password. Must be at least 8 chars. @@ -1618,9 +1620,9 @@ class Account(client: Client) : Service(client) { /** * Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. - * - * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). - * + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored. * @param email User email. @@ -1659,9 +1661,9 @@ class Account(client: Client) : Service(client) { /** * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. - * - * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). - * + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * * * @param userId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored. * @param email User email. @@ -1703,10 +1705,10 @@ class Account(client: Client) : Service(client) { /** * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. - * - * If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. - * - * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * + * If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom. * @param success URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. @@ -1742,8 +1744,8 @@ class Account(client: Client) : Service(client) { /** * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. - * - * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param userId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored. * @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. @@ -1778,9 +1780,9 @@ class Account(client: Client) : Service(client) { /** * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. - * - * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. - * + * + * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. + * * * @param url URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @return [io.appwrite.models.Token] diff --git a/src/main/kotlin/io/appwrite/services/Avatars.kt b/src/main/kotlin/io/appwrite/services/Avatars.kt index 9fbec1e0..ee1ead30 100644 --- a/src/main/kotlin/io/appwrite/services/Avatars.kt +++ b/src/main/kotlin/io/appwrite/services/Avatars.kt @@ -17,8 +17,8 @@ class Avatars(client: Client) : Service(client) { /** * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings. - * - * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. * * @param code Browser Code. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -54,9 +54,9 @@ class Avatars(client: Client) : Service(client) { /** * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. - * - * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. - * + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * * * @param code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -92,8 +92,8 @@ class Avatars(client: Client) : Service(client) { /** * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL. - * - * This endpoint does not follow HTTP redirects. + * + * This endpoint does not follow HTTP redirects. * * @param url Website URL which you want to fetch the favicon from. * @return [ByteArray] @@ -119,9 +119,9 @@ class Avatars(client: Client) : Service(client) { /** * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard. - * - * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. - * + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * * * @param code Country Code. ISO Alpha-2 country code format. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -157,10 +157,10 @@ class Avatars(client: Client) : Service(client) { /** * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. - * - * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px. - * - * This endpoint does not follow HTTP redirects. + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px. + * + * This endpoint does not follow HTTP redirects. * * @param url Image URL which you want to crop. * @param width Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400. @@ -193,11 +193,11 @@ class Avatars(client: Client) : Service(client) { /** * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned. - * - * You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. - * - * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. - * + * + * You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * * * @param name Full Name. When empty, current user name or email will be used. Max length: 128 chars. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -233,7 +233,7 @@ class Avatars(client: Client) : Service(client) { /** * Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image. - * + * * * @param text Plain text to be converted to QR code image. * @param size QR code size. Pass an integer between 1 to 1000. Defaults to 400. diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index e852623b..3531a930 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -54,7 +54,7 @@ class Databases(client: Client) : Service(client) { /** * Create a new Database. - * + * * * @param databaseId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param name Database name. Max length: 128 chars. @@ -469,7 +469,7 @@ class Databases(client: Client) : Service(client) { /** * Create a boolean attribute. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). @@ -678,7 +678,7 @@ class Databases(client: Client) : Service(client) { /** * Create an email attribute. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -731,7 +731,7 @@ class Databases(client: Client) : Service(client) { /** * Update an email attribute. Changing the `default` value will not update already existing documents. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -784,7 +784,7 @@ class Databases(client: Client) : Service(client) { /** * Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -840,7 +840,7 @@ class Databases(client: Client) : Service(client) { /** * Update an enum attribute. Changing the `default` value will not update already existing documents. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -896,7 +896,7 @@ class Databases(client: Client) : Service(client) { /** * Create a float attribute. Optionally, minimum and maximum values can be provided. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -955,7 +955,7 @@ class Databases(client: Client) : Service(client) { /** * Update a float attribute. Changing the `default` value will not update already existing documents. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1014,7 +1014,7 @@ class Databases(client: Client) : Service(client) { /** * Create an integer attribute. Optionally, minimum and maximum values can be provided. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1073,7 +1073,7 @@ class Databases(client: Client) : Service(client) { /** * Update an integer attribute. Changing the `default` value will not update already existing documents. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1132,7 +1132,7 @@ class Databases(client: Client) : Service(client) { /** * Create IP address attribute. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1185,7 +1185,7 @@ class Databases(client: Client) : Service(client) { /** * Update an ip attribute. Changing the `default` value will not update already existing documents. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1238,7 +1238,7 @@ class Databases(client: Client) : Service(client) { /** * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1297,7 +1297,7 @@ class Databases(client: Client) : Service(client) { /** * Create a string attribute. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). @@ -1356,7 +1356,7 @@ class Databases(client: Client) : Service(client) { /** * Update a string attribute. Changing the `default` value will not update already existing documents. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). @@ -1412,7 +1412,7 @@ class Databases(client: Client) : Service(client) { /** * Create a URL attribute. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1465,7 +1465,7 @@ class Databases(client: Client) : Service(client) { /** * Update an url attribute. Changing the `default` value will not update already existing documents. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1593,7 +1593,7 @@ class Databases(client: Client) : Service(client) { /** * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1685,7 +1685,7 @@ class Databases(client: Client) : Service(client) { } /** - * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. + * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). @@ -1862,7 +1862,7 @@ class Databases(client: Client) : Service(client) { /** * Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. - * + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1906,6 +1906,7 @@ class Databases(client: Client) : Service(client) { /** * Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -2572,7 +2573,7 @@ class Databases(client: Client) : Service(client) { /** * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. - * Attributes can be `key`, `fulltext`, and `unique`. + * Attributes can be `key`, `fulltext`, and `unique`. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). diff --git a/src/main/kotlin/io/appwrite/services/Functions.kt b/src/main/kotlin/io/appwrite/services/Functions.kt index 7b339705..354a07b4 100644 --- a/src/main/kotlin/io/appwrite/services/Functions.kt +++ b/src/main/kotlin/io/appwrite/services/Functions.kt @@ -399,10 +399,10 @@ class Functions(client: Client) : Service(client) { /** * Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID. - * - * This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions). - * - * Use the "command" param to set the entrypoint used to execute your code. + * + * This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions). + * + * Use the "command" param to set the entrypoint used to execute your code. * * @param functionId Function ID. * @param code Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory. @@ -490,8 +490,8 @@ class Functions(client: Client) : Service(client) { /** * Create a deployment based on a template. - * - * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details. + * + * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details. * * @param functionId Function ID. * @param repository Repository name of the template. @@ -539,8 +539,8 @@ class Functions(client: Client) : Service(client) { /** * Create a deployment when a function is connected to VCS. - * - * This endpoint lets you create deployment from a branch, commit, or a tag. + * + * This endpoint lets you create deployment from a branch, commit, or a tag. * * @param functionId Function ID. * @param type Type of reference passed. Allowed values are: branch, commit diff --git a/src/main/kotlin/io/appwrite/services/Health.kt b/src/main/kotlin/io/appwrite/services/Health.kt index 834ab02e..f8d9cbf8 100644 --- a/src/main/kotlin/io/appwrite/services/Health.kt +++ b/src/main/kotlin/io/appwrite/services/Health.kt @@ -308,7 +308,7 @@ class Health(client: Client) : Service(client) { /** * Returns the amount of failed jobs in a given queue. - * + * * * @param name The name of the queue * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. diff --git a/src/main/kotlin/io/appwrite/services/Locale.kt b/src/main/kotlin/io/appwrite/services/Locale.kt index 435f182a..7d7dbfc0 100644 --- a/src/main/kotlin/io/appwrite/services/Locale.kt +++ b/src/main/kotlin/io/appwrite/services/Locale.kt @@ -15,8 +15,8 @@ class Locale(client: Client) : Service(client) { /** * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) + * + * ([IP Geolocation by DB-IP](https://db-ip.com)) * * @return [io.appwrite.models.Locale] */ diff --git a/src/main/kotlin/io/appwrite/services/Messaging.kt b/src/main/kotlin/io/appwrite/services/Messaging.kt index 27c0a6c6..38a94d77 100644 --- a/src/main/kotlin/io/appwrite/services/Messaging.kt +++ b/src/main/kotlin/io/appwrite/services/Messaging.kt @@ -114,7 +114,7 @@ class Messaging(client: Client) : Service(client) { /** * Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. - * + * * * @param messageId Message ID. * @param topics List of Topic IDs. @@ -266,7 +266,7 @@ class Messaging(client: Client) : Service(client) { /** * Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. - * + * * * @param messageId Message ID. * @param topics List of Topic IDs. @@ -364,8 +364,8 @@ class Messaging(client: Client) : Service(client) { * @return [io.appwrite.models.Message] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `CreateSMS` instead.", - replaceWith = ReplaceWith("io.appwrite.services.CreateSMS"), + message = "This API has been deprecated since 1.8.0. Please use `Messaging.createSMS` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Messaging.createSMS"), since = "1.8.0" ) @JvmOverloads @@ -458,7 +458,7 @@ class Messaging(client: Client) : Service(client) { /** * Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. - * + * * * @param messageId Message ID. * @param topics List of Topic IDs. @@ -470,8 +470,8 @@ class Messaging(client: Client) : Service(client) { * @return [io.appwrite.models.Message] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateSMS` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateSMS"), + message = "This API has been deprecated since 1.8.0. Please use `Messaging.updateSMS` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Messaging.updateSMS"), since = "1.8.0" ) @JvmOverloads @@ -514,7 +514,7 @@ class Messaging(client: Client) : Service(client) { /** * Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. - * + * * * @param messageId Message ID. * @param topics List of Topic IDs. @@ -565,7 +565,7 @@ class Messaging(client: Client) : Service(client) { /** * Get a message by its unique ID. - * + * * * @param messageId Message ID. * @return [io.appwrite.models.Message] @@ -737,8 +737,8 @@ class Messaging(client: Client) : Service(client) { * @return [io.appwrite.models.Provider] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `CreateAPNSProvider` instead.", - replaceWith = ReplaceWith("io.appwrite.services.CreateAPNSProvider"), + message = "This API has been deprecated since 1.8.0. Please use `Messaging.createAPNSProvider` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Messaging.createAPNSProvider"), since = "1.8.0" ) @JvmOverloads @@ -848,8 +848,8 @@ class Messaging(client: Client) : Service(client) { * @return [io.appwrite.models.Provider] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateAPNSProvider` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateAPNSProvider"), + message = "This API has been deprecated since 1.8.0. Please use `Messaging.updateAPNSProvider` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Messaging.updateAPNSProvider"), since = "1.8.0" ) @JvmOverloads @@ -955,8 +955,8 @@ class Messaging(client: Client) : Service(client) { * @return [io.appwrite.models.Provider] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `CreateFCMProvider` instead.", - replaceWith = ReplaceWith("io.appwrite.services.CreateFCMProvider"), + message = "This API has been deprecated since 1.8.0. Please use `Messaging.createFCMProvider` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Messaging.createFCMProvider"), since = "1.8.0" ) @JvmOverloads @@ -1042,8 +1042,8 @@ class Messaging(client: Client) : Service(client) { * @return [io.appwrite.models.Provider] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateFCMProvider` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateFCMProvider"), + message = "This API has been deprecated since 1.8.0. Please use `Messaging.updateFCMProvider` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Messaging.updateFCMProvider"), since = "1.8.0" ) @JvmOverloads @@ -1457,8 +1457,8 @@ class Messaging(client: Client) : Service(client) { * @return [io.appwrite.models.Provider] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `CreateSMTPProvider` instead.", - replaceWith = ReplaceWith("io.appwrite.services.CreateSMTPProvider"), + message = "This API has been deprecated since 1.8.0. Please use `Messaging.createSMTPProvider` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Messaging.createSMTPProvider"), since = "1.8.0" ) @JvmOverloads @@ -1604,8 +1604,8 @@ class Messaging(client: Client) : Service(client) { * @return [io.appwrite.models.Provider] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateSMTPProvider` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateSMTPProvider"), + message = "This API has been deprecated since 1.8.0. Please use `Messaging.updateSMTPProvider` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Messaging.updateSMTPProvider"), since = "1.8.0" ) @JvmOverloads @@ -2109,7 +2109,7 @@ class Messaging(client: Client) : Service(client) { /** * Get a provider by its unique ID. - * + * * * @param providerId Provider ID. * @return [io.appwrite.models.Provider] @@ -2307,7 +2307,7 @@ class Messaging(client: Client) : Service(client) { /** * Get a topic by its unique ID. - * + * * * @param topicId Topic ID. * @return [io.appwrite.models.Topic] @@ -2338,7 +2338,7 @@ class Messaging(client: Client) : Service(client) { /** * Update a topic by its unique ID. - * + * * * @param topicId Topic ID. * @param name Topic Name. @@ -2512,7 +2512,7 @@ class Messaging(client: Client) : Service(client) { /** * Get a subscriber by its unique ID. - * + * * * @param topicId Topic ID. The topic ID subscribed to. * @param subscriberId Subscriber ID. diff --git a/src/main/kotlin/io/appwrite/services/Sites.kt b/src/main/kotlin/io/appwrite/services/Sites.kt index a57cff58..171a6d9d 100644 --- a/src/main/kotlin/io/appwrite/services/Sites.kt +++ b/src/main/kotlin/io/appwrite/services/Sites.kt @@ -485,8 +485,8 @@ class Sites(client: Client) : Service(client) { /** * Create a deployment based on a template. - * - * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details. + * + * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details. * * @param siteId Site ID. * @param repository Repository name of the template. @@ -534,8 +534,8 @@ class Sites(client: Client) : Service(client) { /** * Create a deployment when a site is connected to VCS. - * - * This endpoint lets you create deployment from a branch, commit, or a tag. + * + * This endpoint lets you create deployment from a branch, commit, or a tag. * * @param siteId Site ID. * @param type Type of reference passed. Allowed values are: branch, commit diff --git a/src/main/kotlin/io/appwrite/services/Storage.kt b/src/main/kotlin/io/appwrite/services/Storage.kt index fcaae571..c1cad5e3 100644 --- a/src/main/kotlin/io/appwrite/services/Storage.kt +++ b/src/main/kotlin/io/appwrite/services/Storage.kt @@ -263,13 +263,13 @@ class Storage(client: Client) : Service(client) { /** * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console. - * - * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes. - * - * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one. - * - * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. - * + * + * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes. + * + * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one. + * + * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. + * * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @param fileId File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. diff --git a/src/main/kotlin/io/appwrite/services/TablesDb.kt b/src/main/kotlin/io/appwrite/services/TablesDb.kt index 9503625a..a8229df1 100644 --- a/src/main/kotlin/io/appwrite/services/TablesDb.kt +++ b/src/main/kotlin/io/appwrite/services/TablesDb.kt @@ -16,7 +16,7 @@ class TablesDB(client: Client) : Service(client) { /** * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. * - * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name * @param search Search term to filter your list results. Max length: 256 chars. * @return [io.appwrite.models.DatabaseList] */ @@ -49,7 +49,7 @@ class TablesDB(client: Client) : Service(client) { /** * Create a new Database. - * + * * * @param databaseId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param name Database name. Max length: 128 chars. @@ -185,7 +185,7 @@ class TablesDB(client: Client) : Service(client) { * Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results. * * @param databaseId Database ID. - * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity * @param search Search term to filter your list results. Max length: 256 chars. * @return [io.appwrite.models.TableList] */ @@ -380,7 +380,7 @@ class TablesDB(client: Client) : Service(client) { * * @param databaseId Database ID. * @param tableId Table ID. - * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error * @return [io.appwrite.models.ColumnList] */ @JvmOverloads @@ -414,7 +414,7 @@ class TablesDB(client: Client) : Service(client) { /** * Create a boolean column. - * + * * * @param databaseId Database ID. * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). @@ -603,7 +603,7 @@ class TablesDB(client: Client) : Service(client) { /** * Create an email column. - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -651,7 +651,7 @@ class TablesDB(client: Client) : Service(client) { /** * Update an email column. Changing the `default` value will not update already existing rows. - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -749,7 +749,7 @@ class TablesDB(client: Client) : Service(client) { /** * Update an enum column. Changing the `default` value will not update already existing rows. - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -800,7 +800,7 @@ class TablesDB(client: Client) : Service(client) { /** * Create a float column. Optionally, minimum and maximum values can be provided. - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -854,7 +854,7 @@ class TablesDB(client: Client) : Service(client) { /** * Update a float column. Changing the `default` value will not update already existing rows. - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -908,7 +908,7 @@ class TablesDB(client: Client) : Service(client) { /** * Create an integer column. Optionally, minimum and maximum values can be provided. - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -962,7 +962,7 @@ class TablesDB(client: Client) : Service(client) { /** * Update an integer column. Changing the `default` value will not update already existing rows. - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1016,7 +1016,7 @@ class TablesDB(client: Client) : Service(client) { /** * Create IP address column. - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1064,7 +1064,7 @@ class TablesDB(client: Client) : Service(client) { /** * Update an ip column. Changing the `default` value will not update already existing rows. - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1112,7 +1112,7 @@ class TablesDB(client: Client) : Service(client) { /** * Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1166,12 +1166,12 @@ class TablesDB(client: Client) : Service(client) { /** * Create a string column. - * + * * * @param databaseId Database ID. * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). * @param key Column Key. - * @param size Attribute size for text attributes, in number of characters. + * @param size Column size for text columns, in number of characters. * @param required Is column required? * @param default Default value for column when not provided. Cannot be set when column is required. * @param array Is column an array? @@ -1220,7 +1220,7 @@ class TablesDB(client: Client) : Service(client) { /** * Update a string column. Changing the `default` value will not update already existing rows. - * + * * * @param databaseId Database ID. * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). @@ -1271,7 +1271,7 @@ class TablesDB(client: Client) : Service(client) { /** * Create a URL column. - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1319,7 +1319,7 @@ class TablesDB(client: Client) : Service(client) { /** * Update an url column. Changing the `default` value will not update already existing rows. - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1432,7 +1432,7 @@ class TablesDB(client: Client) : Service(client) { /** * Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1480,7 +1480,7 @@ class TablesDB(client: Client) : Service(client) { * * @param databaseId Database ID. * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). - * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error * @return [io.appwrite.models.ColumnIndexList] */ @JvmOverloads @@ -1514,7 +1514,7 @@ class TablesDB(client: Client) : Service(client) { /** * Creates an index on the columns listed. Your index should include all the columns you will query in a single request. - * Type can be `key`, `fulltext`, or `unique`. + * Type can be `key`, `fulltext`, or `unique`. * * @param databaseId Database ID. * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). @@ -1671,7 +1671,7 @@ class TablesDB(client: Client) : Service(client) { } /** - * Get a list of all the user's rows in a given table. You can use the query params to filter your results. + * Get a list of all the user's rows in a given table. You can use the query params to filter your results. * * @param databaseId Database ID. * @param tableId Table ID. You can create a new table using the TableDB service [server integration](https://appwrite.io/docs/server/tablesdbdb#tablesdbCreate). @@ -1823,7 +1823,7 @@ class TablesDB(client: Client) : Service(client) { /** * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console. - * + * * * @param databaseId Database ID. * @param tableId Table ID. @@ -1862,6 +1862,7 @@ class TablesDB(client: Client) : Service(client) { /** * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console. + * * * @param databaseId Database ID. * @param tableId Table ID. diff --git a/src/main/kotlin/io/appwrite/services/Teams.kt b/src/main/kotlin/io/appwrite/services/Teams.kt index 5ad5d4f5..923a01b2 100644 --- a/src/main/kotlin/io/appwrite/services/Teams.kt +++ b/src/main/kotlin/io/appwrite/services/Teams.kt @@ -207,7 +207,7 @@ class Teams(client: Client) : Service(client) { } /** - * Update the team's name by its unique ID. + * Update the team's name by its unique ID. * * @param teamId Team ID. * @param name New team name. Max length: 128 chars. @@ -289,13 +289,13 @@ class Teams(client: Client) : Service(client) { /** * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. - * - * You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. - * - * Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. - * - * Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. - * + * + * You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. + * + * Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. + * + * Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. + * * * @param teamId Team ID. * @param roles Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long. @@ -379,7 +379,7 @@ class Teams(client: Client) : Service(client) { /** * Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). - * + * * * @param teamId Team ID. * @param membershipId Membership ID. @@ -447,9 +447,9 @@ class Teams(client: Client) : Service(client) { /** * Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user. - * - * If the request is successful, a session for the user is automatically created. - * + * + * If the request is successful, a session for the user is automatically created. + * * * @param teamId Team ID. * @param membershipId Membership ID. @@ -520,7 +520,7 @@ class Teams(client: Client) : Service(client) { } /** - * Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). + * Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). * * @param teamId Team ID. * @return [io.appwrite.models.Preferences] @@ -569,7 +569,7 @@ class Teams(client: Client) : Service(client) { } /** - * Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. + * Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. * * @param teamId Team ID. * @param prefs Prefs key-value JSON object. diff --git a/src/main/kotlin/io/appwrite/services/Users.kt b/src/main/kotlin/io/appwrite/services/Users.kt index 6abf3cd8..9af250df 100644 --- a/src/main/kotlin/io/appwrite/services/Users.kt +++ b/src/main/kotlin/io/appwrite/services/Users.kt @@ -49,7 +49,7 @@ class Users(client: Client) : Service(client) { } /** - * Get a list of all the project's users. You can use the query params to filter your results. + * Get a list of all the project's users. You can use the query params to filter your results. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels * @param search Search term to filter your list results. Max length: 256 chars. @@ -879,8 +879,8 @@ class Users(client: Client) : Service(client) { /** * Update the user labels by its unique ID. - * - * Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info. + * + * Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info. * * @param userId User ID. * @param labels Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long. @@ -915,7 +915,9 @@ class Users(client: Client) : Service(client) { } /** - * Update the user labels by its unique ID. Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info. + * Update the user labels by its unique ID. + * + * Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info. * * @param userId User ID. * @param labels Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long. @@ -1010,8 +1012,8 @@ class Users(client: Client) : Service(client) { * @return [io.appwrite.models.User] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateMFA` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateMFA"), + message = "This API has been deprecated since 1.8.0. Please use `Users.updateMFA` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Users.updateMFA"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1050,8 +1052,8 @@ class Users(client: Client) : Service(client) { * @return [io.appwrite.models.User] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateMFA` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateMFA"), + message = "This API has been deprecated since 1.8.0. Please use `Users.updateMFA` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Users.updateMFA"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1124,8 +1126,8 @@ class Users(client: Client) : Service(client) { * @return [Any] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `DeleteMFAAuthenticator` instead.", - replaceWith = ReplaceWith("io.appwrite.services.DeleteMFAAuthenticator"), + message = "This API has been deprecated since 1.8.0. Please use `Users.deleteMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Users.deleteMFAAuthenticator"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1188,8 +1190,8 @@ class Users(client: Client) : Service(client) { * @return [io.appwrite.models.MfaFactors] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `ListMFAFactors` instead.", - replaceWith = ReplaceWith("io.appwrite.services.ListMFAFactors"), + message = "This API has been deprecated since 1.8.0. Please use `Users.listMFAFactors` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Users.listMFAFactors"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1253,8 +1255,8 @@ class Users(client: Client) : Service(client) { * @return [io.appwrite.models.MfaRecoveryCodes] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `GetMFARecoveryCodes` instead.", - replaceWith = ReplaceWith("io.appwrite.services.GetMFARecoveryCodes"), + message = "This API has been deprecated since 1.8.0. Please use `Users.getMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Users.getMFARecoveryCodes"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1318,8 +1320,8 @@ class Users(client: Client) : Service(client) { * @return [io.appwrite.models.MfaRecoveryCodes] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateMFARecoveryCodes` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateMFARecoveryCodes"), + message = "This API has been deprecated since 1.8.0. Please use `Users.updateMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Users.updateMFARecoveryCodes"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1385,8 +1387,8 @@ class Users(client: Client) : Service(client) { * @return [io.appwrite.models.MfaRecoveryCodes] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `CreateMFARecoveryCodes` instead.", - replaceWith = ReplaceWith("io.appwrite.services.CreateMFARecoveryCodes"), + message = "This API has been deprecated since 1.8.0. Please use `Users.createMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Users.createMFARecoveryCodes"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -1730,8 +1732,8 @@ class Users(client: Client) : Service(client) { /** * Creates a session for a user. Returns an immediately usable session object. - * - * If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint. + * + * If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @return [io.appwrite.models.Session] @@ -1854,7 +1856,7 @@ class Users(client: Client) : Service(client) { } /** - * Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved. + * Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved. * * @param userId User ID. * @param status User Status. To activate the user pass `true` and to block the user pass `false`. @@ -2060,7 +2062,7 @@ class Users(client: Client) : Service(client) { /** * Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. - * + * * * @param userId User ID. * @param length Token length in characters. The default length is 6 characters From c24e765c04eb2a15ac8635c72f9c405e0a71d0db Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 26 Aug 2025 04:25:57 +1200 Subject: [PATCH 7/7] Fix docs --- .../{create-j-w-t.md => create-jwt.md} | 0 .../account/create-m-f-a-authenticator.md | 24 ------------- .../java/account/create-m-f-a-challenge.md | 23 ------------ .../account/create-m-f-a-recovery-codes.md | 19 ---------- ...r-l-token.md => create-magic-url-token.md} | 0 .../java/account/create-mfa-authenticator.md | 2 +- .../java/account/create-mfa-challenge.md | 2 +- .../java/account/create-mfa-recovery-codes.md | 2 +- ...auth2token.md => create-o-auth-2-token.md} | 0 .../account/delete-m-f-a-authenticator.md | 24 ------------- .../java/account/delete-mfa-authenticator.md | 2 +- .../java/account/get-m-f-a-recovery-codes.md | 19 ---------- .../java/account/get-mfa-recovery-codes.md | 2 +- .../java/account/list-m-f-a-factors.md | 19 ---------- .../examples/java/account/list-mfa-factors.md | 2 +- .../account/update-m-f-a-authenticator.md | 25 ------------- .../java/account/update-m-f-a-challenge.md | 24 ------------- .../account/update-m-f-a-recovery-codes.md | 19 ---------- ...session.md => update-magic-url-session.md} | 0 .../java/account/update-mfa-authenticator.md | 2 +- .../java/account/update-mfa-challenge.md | 2 +- .../java/account/update-mfa-recovery-codes.md | 2 +- .../{update-m-f-a.md => update-mfa.md} | 0 .../java/avatars/{get-q-r.md => get-qr.md} | 0 .../java/health/{get-d-b.md => get-db.md} | 0 ...-countries-e-u.md => list-countries-eu.md} | 0 .../java/messaging/create-a-p-n-s-provider.md | 30 ---------------- .../java/messaging/create-apns-provider.md | 2 +- .../java/messaging/create-f-c-m-provider.md | 26 -------------- .../java/messaging/create-fcm-provider.md | 2 +- ...1provider.md => create-msg-91-provider.md} | 0 docs/examples/java/messaging/create-s-m-s.md | 29 --------------- .../java/messaging/create-s-m-t-p-provider.md | 36 ------------------- docs/examples/java/messaging/create-sms.md | 2 +- .../java/messaging/create-smtp-provider.md | 2 +- .../java/messaging/update-a-p-n-s-provider.md | 30 ---------------- .../java/messaging/update-apns-provider.md | 2 +- .../java/messaging/update-f-c-m-provider.md | 26 -------------- .../java/messaging/update-fcm-provider.md | 2 +- ...1provider.md => update-msg-91-provider.md} | 0 docs/examples/java/messaging/update-s-m-s.md | 29 --------------- .../java/messaging/update-s-m-t-p-provider.md | 36 ------------------- docs/examples/java/messaging/update-sms.md | 2 +- .../java/messaging/update-smtp-provider.md | 2 +- ...e-argon2user.md => create-argon-2-user.md} | 0 .../users/{create-j-w-t.md => create-jwt.md} | 0 .../java/users/create-m-f-a-recovery-codes.md | 23 ------------ ...create-m-d5user.md => create-md-5-user.md} | 0 .../java/users/create-mfa-recovery-codes.md | 2 +- ...-h-pass-user.md => create-ph-pass-user.md} | 0 ...reate-s-h-a-user.md => create-sha-user.md} | 0 .../java/users/delete-m-f-a-authenticator.md | 25 ------------- .../java/users/delete-mfa-authenticator.md | 2 +- .../java/users/get-m-f-a-recovery-codes.md | 23 ------------ .../java/users/get-mfa-recovery-codes.md | 2 +- .../examples/java/users/list-m-f-a-factors.md | 23 ------------ docs/examples/java/users/list-mfa-factors.md | 2 +- .../java/users/update-m-f-a-recovery-codes.md | 23 ------------ docs/examples/java/users/update-m-f-a.md | 24 ------------- .../java/users/update-mfa-recovery-codes.md | 2 +- docs/examples/java/users/update-mfa.md | 2 +- .../{create-j-w-t.md => create-jwt.md} | 0 .../account/create-m-f-a-authenticator.md | 15 -------- .../kotlin/account/create-m-f-a-challenge.md | 14 -------- .../account/create-m-f-a-recovery-codes.md | 12 ------- ...r-l-token.md => create-magic-url-token.md} | 0 .../account/create-mfa-authenticator.md | 2 +- .../kotlin/account/create-mfa-challenge.md | 2 +- .../account/create-mfa-recovery-codes.md | 2 +- ...auth2token.md => create-o-auth-2-token.md} | 0 .../account/delete-m-f-a-authenticator.md | 15 -------- .../account/delete-mfa-authenticator.md | 2 +- .../account/get-m-f-a-recovery-codes.md | 12 ------- .../kotlin/account/get-mfa-recovery-codes.md | 2 +- .../kotlin/account/list-m-f-a-factors.md | 12 ------- .../kotlin/account/list-mfa-factors.md | 2 +- .../account/update-m-f-a-authenticator.md | 16 --------- .../kotlin/account/update-m-f-a-challenge.md | 15 -------- .../account/update-m-f-a-recovery-codes.md | 12 ------- ...session.md => update-magic-url-session.md} | 0 .../account/update-mfa-authenticator.md | 2 +- .../kotlin/account/update-mfa-challenge.md | 2 +- .../account/update-mfa-recovery-codes.md | 2 +- .../{update-m-f-a.md => update-mfa.md} | 0 .../kotlin/avatars/{get-q-r.md => get-qr.md} | 0 .../kotlin/health/{get-d-b.md => get-db.md} | 0 ...-countries-e-u.md => list-countries-eu.md} | 0 .../messaging/create-a-p-n-s-provider.md | 21 ----------- .../kotlin/messaging/create-apns-provider.md | 2 +- .../kotlin/messaging/create-f-c-m-provider.md | 17 --------- .../kotlin/messaging/create-fcm-provider.md | 2 +- ...1provider.md => create-msg-91-provider.md} | 0 .../examples/kotlin/messaging/create-s-m-s.md | 20 ----------- .../messaging/create-s-m-t-p-provider.md | 27 -------------- docs/examples/kotlin/messaging/create-sms.md | 2 +- .../kotlin/messaging/create-smtp-provider.md | 2 +- .../messaging/update-a-p-n-s-provider.md | 21 ----------- .../kotlin/messaging/update-apns-provider.md | 2 +- .../kotlin/messaging/update-f-c-m-provider.md | 17 --------- .../kotlin/messaging/update-fcm-provider.md | 2 +- ...1provider.md => update-msg-91-provider.md} | 0 .../examples/kotlin/messaging/update-s-m-s.md | 20 ----------- .../messaging/update-s-m-t-p-provider.md | 27 -------------- docs/examples/kotlin/messaging/update-sms.md | 2 +- .../kotlin/messaging/update-smtp-provider.md | 2 +- ...e-argon2user.md => create-argon-2-user.md} | 0 .../users/{create-j-w-t.md => create-jwt.md} | 0 .../users/create-m-f-a-recovery-codes.md | 14 -------- ...create-m-d5user.md => create-md-5-user.md} | 0 .../kotlin/users/create-mfa-recovery-codes.md | 2 +- ...-h-pass-user.md => create-ph-pass-user.md} | 0 ...reate-s-h-a-user.md => create-sha-user.md} | 0 .../users/delete-m-f-a-authenticator.md | 16 --------- .../kotlin/users/delete-mfa-authenticator.md | 2 +- .../kotlin/users/get-m-f-a-recovery-codes.md | 14 -------- .../kotlin/users/get-mfa-recovery-codes.md | 2 +- .../kotlin/users/list-m-f-a-factors.md | 14 -------- .../examples/kotlin/users/list-mfa-factors.md | 2 +- .../users/update-m-f-a-recovery-codes.md | 14 -------- docs/examples/kotlin/users/update-m-f-a.md | 15 -------- .../kotlin/users/update-mfa-recovery-codes.md | 2 +- docs/examples/kotlin/users/update-mfa.md | 2 +- 122 files changed, 46 insertions(+), 1005 deletions(-) rename docs/examples/java/account/{create-j-w-t.md => create-jwt.md} (100%) delete mode 100644 docs/examples/java/account/create-m-f-a-authenticator.md delete mode 100644 docs/examples/java/account/create-m-f-a-challenge.md delete mode 100644 docs/examples/java/account/create-m-f-a-recovery-codes.md rename docs/examples/java/account/{create-magic-u-r-l-token.md => create-magic-url-token.md} (100%) rename docs/examples/java/account/{create-o-auth2token.md => create-o-auth-2-token.md} (100%) delete mode 100644 docs/examples/java/account/delete-m-f-a-authenticator.md delete mode 100644 docs/examples/java/account/get-m-f-a-recovery-codes.md delete mode 100644 docs/examples/java/account/list-m-f-a-factors.md delete mode 100644 docs/examples/java/account/update-m-f-a-authenticator.md delete mode 100644 docs/examples/java/account/update-m-f-a-challenge.md delete mode 100644 docs/examples/java/account/update-m-f-a-recovery-codes.md rename docs/examples/java/account/{update-magic-u-r-l-session.md => update-magic-url-session.md} (100%) rename docs/examples/java/account/{update-m-f-a.md => update-mfa.md} (100%) rename docs/examples/java/avatars/{get-q-r.md => get-qr.md} (100%) rename docs/examples/java/health/{get-d-b.md => get-db.md} (100%) rename docs/examples/java/locale/{list-countries-e-u.md => list-countries-eu.md} (100%) delete mode 100644 docs/examples/java/messaging/create-a-p-n-s-provider.md delete mode 100644 docs/examples/java/messaging/create-f-c-m-provider.md rename docs/examples/java/messaging/{create-msg91provider.md => create-msg-91-provider.md} (100%) delete mode 100644 docs/examples/java/messaging/create-s-m-s.md delete mode 100644 docs/examples/java/messaging/create-s-m-t-p-provider.md delete mode 100644 docs/examples/java/messaging/update-a-p-n-s-provider.md delete mode 100644 docs/examples/java/messaging/update-f-c-m-provider.md rename docs/examples/java/messaging/{update-msg91provider.md => update-msg-91-provider.md} (100%) delete mode 100644 docs/examples/java/messaging/update-s-m-s.md delete mode 100644 docs/examples/java/messaging/update-s-m-t-p-provider.md rename docs/examples/java/users/{create-argon2user.md => create-argon-2-user.md} (100%) rename docs/examples/java/users/{create-j-w-t.md => create-jwt.md} (100%) delete mode 100644 docs/examples/java/users/create-m-f-a-recovery-codes.md rename docs/examples/java/users/{create-m-d5user.md => create-md-5-user.md} (100%) rename docs/examples/java/users/{create-p-h-pass-user.md => create-ph-pass-user.md} (100%) rename docs/examples/java/users/{create-s-h-a-user.md => create-sha-user.md} (100%) delete mode 100644 docs/examples/java/users/delete-m-f-a-authenticator.md delete mode 100644 docs/examples/java/users/get-m-f-a-recovery-codes.md delete mode 100644 docs/examples/java/users/list-m-f-a-factors.md delete mode 100644 docs/examples/java/users/update-m-f-a-recovery-codes.md delete mode 100644 docs/examples/java/users/update-m-f-a.md rename docs/examples/kotlin/account/{create-j-w-t.md => create-jwt.md} (100%) delete mode 100644 docs/examples/kotlin/account/create-m-f-a-authenticator.md delete mode 100644 docs/examples/kotlin/account/create-m-f-a-challenge.md delete mode 100644 docs/examples/kotlin/account/create-m-f-a-recovery-codes.md rename docs/examples/kotlin/account/{create-magic-u-r-l-token.md => create-magic-url-token.md} (100%) rename docs/examples/kotlin/account/{create-o-auth2token.md => create-o-auth-2-token.md} (100%) delete mode 100644 docs/examples/kotlin/account/delete-m-f-a-authenticator.md delete mode 100644 docs/examples/kotlin/account/get-m-f-a-recovery-codes.md delete mode 100644 docs/examples/kotlin/account/list-m-f-a-factors.md delete mode 100644 docs/examples/kotlin/account/update-m-f-a-authenticator.md delete mode 100644 docs/examples/kotlin/account/update-m-f-a-challenge.md delete mode 100644 docs/examples/kotlin/account/update-m-f-a-recovery-codes.md rename docs/examples/kotlin/account/{update-magic-u-r-l-session.md => update-magic-url-session.md} (100%) rename docs/examples/kotlin/account/{update-m-f-a.md => update-mfa.md} (100%) rename docs/examples/kotlin/avatars/{get-q-r.md => get-qr.md} (100%) rename docs/examples/kotlin/health/{get-d-b.md => get-db.md} (100%) rename docs/examples/kotlin/locale/{list-countries-e-u.md => list-countries-eu.md} (100%) delete mode 100644 docs/examples/kotlin/messaging/create-a-p-n-s-provider.md delete mode 100644 docs/examples/kotlin/messaging/create-f-c-m-provider.md rename docs/examples/kotlin/messaging/{create-msg91provider.md => create-msg-91-provider.md} (100%) delete mode 100644 docs/examples/kotlin/messaging/create-s-m-s.md delete mode 100644 docs/examples/kotlin/messaging/create-s-m-t-p-provider.md delete mode 100644 docs/examples/kotlin/messaging/update-a-p-n-s-provider.md delete mode 100644 docs/examples/kotlin/messaging/update-f-c-m-provider.md rename docs/examples/kotlin/messaging/{update-msg91provider.md => update-msg-91-provider.md} (100%) delete mode 100644 docs/examples/kotlin/messaging/update-s-m-s.md delete mode 100644 docs/examples/kotlin/messaging/update-s-m-t-p-provider.md rename docs/examples/kotlin/users/{create-argon2user.md => create-argon-2-user.md} (100%) rename docs/examples/kotlin/users/{create-j-w-t.md => create-jwt.md} (100%) delete mode 100644 docs/examples/kotlin/users/create-m-f-a-recovery-codes.md rename docs/examples/kotlin/users/{create-m-d5user.md => create-md-5-user.md} (100%) rename docs/examples/kotlin/users/{create-p-h-pass-user.md => create-ph-pass-user.md} (100%) rename docs/examples/kotlin/users/{create-s-h-a-user.md => create-sha-user.md} (100%) delete mode 100644 docs/examples/kotlin/users/delete-m-f-a-authenticator.md delete mode 100644 docs/examples/kotlin/users/get-m-f-a-recovery-codes.md delete mode 100644 docs/examples/kotlin/users/list-m-f-a-factors.md delete mode 100644 docs/examples/kotlin/users/update-m-f-a-recovery-codes.md delete mode 100644 docs/examples/kotlin/users/update-m-f-a.md diff --git a/docs/examples/java/account/create-j-w-t.md b/docs/examples/java/account/create-jwt.md similarity index 100% rename from docs/examples/java/account/create-j-w-t.md rename to docs/examples/java/account/create-jwt.md diff --git a/docs/examples/java/account/create-m-f-a-authenticator.md b/docs/examples/java/account/create-m-f-a-authenticator.md deleted file mode 100644 index d38ddd3b..00000000 --- a/docs/examples/java/account/create-m-f-a-authenticator.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Account; -import io.appwrite.enums.AuthenticatorType; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with - -Account account = new Account(client); - -account.createMFAAuthenticator( - AuthenticatorType.TOTP, // type - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/account/create-m-f-a-challenge.md b/docs/examples/java/account/create-m-f-a-challenge.md deleted file mode 100644 index 5c048cba..00000000 --- a/docs/examples/java/account/create-m-f-a-challenge.md +++ /dev/null @@ -1,23 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Account; -import io.appwrite.enums.AuthenticationFactor; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject(""); // Your project ID - -Account account = new Account(client); - -account.createMFAChallenge( - AuthenticationFactor.EMAIL, // factor - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/account/create-m-f-a-recovery-codes.md b/docs/examples/java/account/create-m-f-a-recovery-codes.md deleted file mode 100644 index 6a47a177..00000000 --- a/docs/examples/java/account/create-m-f-a-recovery-codes.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Account; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with - -Account account = new Account(client); - -account.createMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); -})); diff --git a/docs/examples/java/account/create-magic-u-r-l-token.md b/docs/examples/java/account/create-magic-url-token.md similarity index 100% rename from docs/examples/java/account/create-magic-u-r-l-token.md rename to docs/examples/java/account/create-magic-url-token.md diff --git a/docs/examples/java/account/create-mfa-authenticator.md b/docs/examples/java/account/create-mfa-authenticator.md index ee37e487..d38ddd3b 100644 --- a/docs/examples/java/account/create-mfa-authenticator.md +++ b/docs/examples/java/account/create-mfa-authenticator.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -account.createMfaAuthenticator( +account.createMFAAuthenticator( AuthenticatorType.TOTP, // type new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/create-mfa-challenge.md b/docs/examples/java/account/create-mfa-challenge.md index 4a07e26e..5c048cba 100644 --- a/docs/examples/java/account/create-mfa-challenge.md +++ b/docs/examples/java/account/create-mfa-challenge.md @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -account.createMfaChallenge( +account.createMFAChallenge( AuthenticationFactor.EMAIL, // factor new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/create-mfa-recovery-codes.md b/docs/examples/java/account/create-mfa-recovery-codes.md index eb76cdca..6a47a177 100644 --- a/docs/examples/java/account/create-mfa-recovery-codes.md +++ b/docs/examples/java/account/create-mfa-recovery-codes.md @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { +account.createMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; diff --git a/docs/examples/java/account/create-o-auth2token.md b/docs/examples/java/account/create-o-auth-2-token.md similarity index 100% rename from docs/examples/java/account/create-o-auth2token.md rename to docs/examples/java/account/create-o-auth-2-token.md diff --git a/docs/examples/java/account/delete-m-f-a-authenticator.md b/docs/examples/java/account/delete-m-f-a-authenticator.md deleted file mode 100644 index 20a6acda..00000000 --- a/docs/examples/java/account/delete-m-f-a-authenticator.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Account; -import io.appwrite.enums.AuthenticatorType; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with - -Account account = new Account(client); - -account.deleteMFAAuthenticator( - AuthenticatorType.TOTP, // type - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/account/delete-mfa-authenticator.md b/docs/examples/java/account/delete-mfa-authenticator.md index 06835f66..20a6acda 100644 --- a/docs/examples/java/account/delete-mfa-authenticator.md +++ b/docs/examples/java/account/delete-mfa-authenticator.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -account.deleteMfaAuthenticator( +account.deleteMFAAuthenticator( AuthenticatorType.TOTP, // type new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/get-m-f-a-recovery-codes.md b/docs/examples/java/account/get-m-f-a-recovery-codes.md deleted file mode 100644 index 813a0a62..00000000 --- a/docs/examples/java/account/get-m-f-a-recovery-codes.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Account; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with - -Account account = new Account(client); - -account.getMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); -})); diff --git a/docs/examples/java/account/get-mfa-recovery-codes.md b/docs/examples/java/account/get-mfa-recovery-codes.md index c818c3ea..813a0a62 100644 --- a/docs/examples/java/account/get-mfa-recovery-codes.md +++ b/docs/examples/java/account/get-mfa-recovery-codes.md @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { +account.getMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; diff --git a/docs/examples/java/account/list-m-f-a-factors.md b/docs/examples/java/account/list-m-f-a-factors.md deleted file mode 100644 index 0bdc378b..00000000 --- a/docs/examples/java/account/list-m-f-a-factors.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Account; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with - -Account account = new Account(client); - -account.listMFAFactors(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); -})); diff --git a/docs/examples/java/account/list-mfa-factors.md b/docs/examples/java/account/list-mfa-factors.md index d9f90a41..0bdc378b 100644 --- a/docs/examples/java/account/list-mfa-factors.md +++ b/docs/examples/java/account/list-mfa-factors.md @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -account.listMfaFactors(new CoroutineCallback<>((result, error) -> { +account.listMFAFactors(new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; diff --git a/docs/examples/java/account/update-m-f-a-authenticator.md b/docs/examples/java/account/update-m-f-a-authenticator.md deleted file mode 100644 index 87e3852c..00000000 --- a/docs/examples/java/account/update-m-f-a-authenticator.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Account; -import io.appwrite.enums.AuthenticatorType; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with - -Account account = new Account(client); - -account.updateMFAAuthenticator( - AuthenticatorType.TOTP, // type - "", // otp - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/account/update-m-f-a-challenge.md b/docs/examples/java/account/update-m-f-a-challenge.md deleted file mode 100644 index 5e1bebe6..00000000 --- a/docs/examples/java/account/update-m-f-a-challenge.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Account; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with - -Account account = new Account(client); - -account.updateMFAChallenge( - "", // challengeId - "", // otp - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/account/update-m-f-a-recovery-codes.md b/docs/examples/java/account/update-m-f-a-recovery-codes.md deleted file mode 100644 index 7c303ddc..00000000 --- a/docs/examples/java/account/update-m-f-a-recovery-codes.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Account; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with - -Account account = new Account(client); - -account.updateMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); -})); diff --git a/docs/examples/java/account/update-magic-u-r-l-session.md b/docs/examples/java/account/update-magic-url-session.md similarity index 100% rename from docs/examples/java/account/update-magic-u-r-l-session.md rename to docs/examples/java/account/update-magic-url-session.md diff --git a/docs/examples/java/account/update-mfa-authenticator.md b/docs/examples/java/account/update-mfa-authenticator.md index 947c85a2..87e3852c 100644 --- a/docs/examples/java/account/update-mfa-authenticator.md +++ b/docs/examples/java/account/update-mfa-authenticator.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -account.updateMfaAuthenticator( +account.updateMFAAuthenticator( AuthenticatorType.TOTP, // type "", // otp new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/account/update-mfa-challenge.md b/docs/examples/java/account/update-mfa-challenge.md index b9b0ae9d..5e1bebe6 100644 --- a/docs/examples/java/account/update-mfa-challenge.md +++ b/docs/examples/java/account/update-mfa-challenge.md @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -account.updateMfaChallenge( +account.updateMFAChallenge( "", // challengeId "", // otp new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/account/update-mfa-recovery-codes.md b/docs/examples/java/account/update-mfa-recovery-codes.md index 4b3e5270..7c303ddc 100644 --- a/docs/examples/java/account/update-mfa-recovery-codes.md +++ b/docs/examples/java/account/update-mfa-recovery-codes.md @@ -9,7 +9,7 @@ Client client = new Client() Account account = new Account(client); -account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { +account.updateMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; diff --git a/docs/examples/java/account/update-m-f-a.md b/docs/examples/java/account/update-mfa.md similarity index 100% rename from docs/examples/java/account/update-m-f-a.md rename to docs/examples/java/account/update-mfa.md diff --git a/docs/examples/java/avatars/get-q-r.md b/docs/examples/java/avatars/get-qr.md similarity index 100% rename from docs/examples/java/avatars/get-q-r.md rename to docs/examples/java/avatars/get-qr.md diff --git a/docs/examples/java/health/get-d-b.md b/docs/examples/java/health/get-db.md similarity index 100% rename from docs/examples/java/health/get-d-b.md rename to docs/examples/java/health/get-db.md diff --git a/docs/examples/java/locale/list-countries-e-u.md b/docs/examples/java/locale/list-countries-eu.md similarity index 100% rename from docs/examples/java/locale/list-countries-e-u.md rename to docs/examples/java/locale/list-countries-eu.md diff --git a/docs/examples/java/messaging/create-a-p-n-s-provider.md b/docs/examples/java/messaging/create-a-p-n-s-provider.md deleted file mode 100644 index acae476a..00000000 --- a/docs/examples/java/messaging/create-a-p-n-s-provider.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Messaging; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Messaging messaging = new Messaging(client); - -messaging.createAPNSProvider( - "", // providerId - "", // name - "", // authKey (optional) - "", // authKeyId (optional) - "", // teamId (optional) - "", // bundleId (optional) - false, // sandbox (optional) - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/messaging/create-apns-provider.md b/docs/examples/java/messaging/create-apns-provider.md index 0f661807..acae476a 100644 --- a/docs/examples/java/messaging/create-apns-provider.md +++ b/docs/examples/java/messaging/create-apns-provider.md @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.createApnsProvider( +messaging.createAPNSProvider( "", // providerId "", // name "", // authKey (optional) diff --git a/docs/examples/java/messaging/create-f-c-m-provider.md b/docs/examples/java/messaging/create-f-c-m-provider.md deleted file mode 100644 index 0d67e28c..00000000 --- a/docs/examples/java/messaging/create-f-c-m-provider.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Messaging; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Messaging messaging = new Messaging(client); - -messaging.createFCMProvider( - "", // providerId - "", // name - mapOf( "a" to "b" ), // serviceAccountJSON (optional) - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/messaging/create-fcm-provider.md b/docs/examples/java/messaging/create-fcm-provider.md index 636a1bdd..0d67e28c 100644 --- a/docs/examples/java/messaging/create-fcm-provider.md +++ b/docs/examples/java/messaging/create-fcm-provider.md @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.createFcmProvider( +messaging.createFCMProvider( "", // providerId "", // name mapOf( "a" to "b" ), // serviceAccountJSON (optional) diff --git a/docs/examples/java/messaging/create-msg91provider.md b/docs/examples/java/messaging/create-msg-91-provider.md similarity index 100% rename from docs/examples/java/messaging/create-msg91provider.md rename to docs/examples/java/messaging/create-msg-91-provider.md diff --git a/docs/examples/java/messaging/create-s-m-s.md b/docs/examples/java/messaging/create-s-m-s.md deleted file mode 100644 index ca40cc33..00000000 --- a/docs/examples/java/messaging/create-s-m-s.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Messaging; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Messaging messaging = new Messaging(client); - -messaging.createSMS( - "", // messageId - "", // content - listOf(), // topics (optional) - listOf(), // users (optional) - listOf(), // targets (optional) - false, // draft (optional) - "", // scheduledAt (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/messaging/create-s-m-t-p-provider.md b/docs/examples/java/messaging/create-s-m-t-p-provider.md deleted file mode 100644 index 1f1a0f99..00000000 --- a/docs/examples/java/messaging/create-s-m-t-p-provider.md +++ /dev/null @@ -1,36 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Messaging; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Messaging messaging = new Messaging(client); - -messaging.createSMTPProvider( - "", // providerId - "", // name - "", // host - 1, // port (optional) - "", // username (optional) - "", // password (optional) - SmtpEncryption.NONE, // encryption (optional) - false, // autoTLS (optional) - "", // mailer (optional) - "", // fromName (optional) - "email@example.com", // fromEmail (optional) - "", // replyToName (optional) - "email@example.com", // replyToEmail (optional) - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/messaging/create-sms.md b/docs/examples/java/messaging/create-sms.md index 9e3e3bdf..ca40cc33 100644 --- a/docs/examples/java/messaging/create-sms.md +++ b/docs/examples/java/messaging/create-sms.md @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.createSms( +messaging.createSMS( "", // messageId "", // content listOf(), // topics (optional) diff --git a/docs/examples/java/messaging/create-smtp-provider.md b/docs/examples/java/messaging/create-smtp-provider.md index ebd153c2..1f1a0f99 100644 --- a/docs/examples/java/messaging/create-smtp-provider.md +++ b/docs/examples/java/messaging/create-smtp-provider.md @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.createSmtpProvider( +messaging.createSMTPProvider( "", // providerId "", // name "", // host diff --git a/docs/examples/java/messaging/update-a-p-n-s-provider.md b/docs/examples/java/messaging/update-a-p-n-s-provider.md deleted file mode 100644 index c5da5ba8..00000000 --- a/docs/examples/java/messaging/update-a-p-n-s-provider.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Messaging; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Messaging messaging = new Messaging(client); - -messaging.updateAPNSProvider( - "", // providerId - "", // name (optional) - false, // enabled (optional) - "", // authKey (optional) - "", // authKeyId (optional) - "", // teamId (optional) - "", // bundleId (optional) - false, // sandbox (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/messaging/update-apns-provider.md b/docs/examples/java/messaging/update-apns-provider.md index 737a1424..c5da5ba8 100644 --- a/docs/examples/java/messaging/update-apns-provider.md +++ b/docs/examples/java/messaging/update-apns-provider.md @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.updateApnsProvider( +messaging.updateAPNSProvider( "", // providerId "", // name (optional) false, // enabled (optional) diff --git a/docs/examples/java/messaging/update-f-c-m-provider.md b/docs/examples/java/messaging/update-f-c-m-provider.md deleted file mode 100644 index dd92f932..00000000 --- a/docs/examples/java/messaging/update-f-c-m-provider.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Messaging; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Messaging messaging = new Messaging(client); - -messaging.updateFCMProvider( - "", // providerId - "", // name (optional) - false, // enabled (optional) - mapOf( "a" to "b" ), // serviceAccountJSON (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/messaging/update-fcm-provider.md b/docs/examples/java/messaging/update-fcm-provider.md index 68c56ef1..dd92f932 100644 --- a/docs/examples/java/messaging/update-fcm-provider.md +++ b/docs/examples/java/messaging/update-fcm-provider.md @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.updateFcmProvider( +messaging.updateFCMProvider( "", // providerId "", // name (optional) false, // enabled (optional) diff --git a/docs/examples/java/messaging/update-msg91provider.md b/docs/examples/java/messaging/update-msg-91-provider.md similarity index 100% rename from docs/examples/java/messaging/update-msg91provider.md rename to docs/examples/java/messaging/update-msg-91-provider.md diff --git a/docs/examples/java/messaging/update-s-m-s.md b/docs/examples/java/messaging/update-s-m-s.md deleted file mode 100644 index c59505b6..00000000 --- a/docs/examples/java/messaging/update-s-m-s.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Messaging; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Messaging messaging = new Messaging(client); - -messaging.updateSMS( - "", // messageId - listOf(), // topics (optional) - listOf(), // users (optional) - listOf(), // targets (optional) - "", // content (optional) - false, // draft (optional) - "", // scheduledAt (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/messaging/update-s-m-t-p-provider.md b/docs/examples/java/messaging/update-s-m-t-p-provider.md deleted file mode 100644 index 36f12003..00000000 --- a/docs/examples/java/messaging/update-s-m-t-p-provider.md +++ /dev/null @@ -1,36 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Messaging; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Messaging messaging = new Messaging(client); - -messaging.updateSMTPProvider( - "", // providerId - "", // name (optional) - "", // host (optional) - 1, // port (optional) - "", // username (optional) - "", // password (optional) - SmtpEncryption.NONE, // encryption (optional) - false, // autoTLS (optional) - "", // mailer (optional) - "", // fromName (optional) - "email@example.com", // fromEmail (optional) - "", // replyToName (optional) - "", // replyToEmail (optional) - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/messaging/update-sms.md b/docs/examples/java/messaging/update-sms.md index c55cfdfd..c59505b6 100644 --- a/docs/examples/java/messaging/update-sms.md +++ b/docs/examples/java/messaging/update-sms.md @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.updateSms( +messaging.updateSMS( "", // messageId listOf(), // topics (optional) listOf(), // users (optional) diff --git a/docs/examples/java/messaging/update-smtp-provider.md b/docs/examples/java/messaging/update-smtp-provider.md index 3f396610..36f12003 100644 --- a/docs/examples/java/messaging/update-smtp-provider.md +++ b/docs/examples/java/messaging/update-smtp-provider.md @@ -9,7 +9,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -messaging.updateSmtpProvider( +messaging.updateSMTPProvider( "", // providerId "", // name (optional) "", // host (optional) diff --git a/docs/examples/java/users/create-argon2user.md b/docs/examples/java/users/create-argon-2-user.md similarity index 100% rename from docs/examples/java/users/create-argon2user.md rename to docs/examples/java/users/create-argon-2-user.md diff --git a/docs/examples/java/users/create-j-w-t.md b/docs/examples/java/users/create-jwt.md similarity index 100% rename from docs/examples/java/users/create-j-w-t.md rename to docs/examples/java/users/create-jwt.md diff --git a/docs/examples/java/users/create-m-f-a-recovery-codes.md b/docs/examples/java/users/create-m-f-a-recovery-codes.md deleted file mode 100644 index 167c92cb..00000000 --- a/docs/examples/java/users/create-m-f-a-recovery-codes.md +++ /dev/null @@ -1,23 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Users; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Users users = new Users(client); - -users.createMFARecoveryCodes( - "", // userId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/users/create-m-d5user.md b/docs/examples/java/users/create-md-5-user.md similarity index 100% rename from docs/examples/java/users/create-m-d5user.md rename to docs/examples/java/users/create-md-5-user.md diff --git a/docs/examples/java/users/create-mfa-recovery-codes.md b/docs/examples/java/users/create-mfa-recovery-codes.md index 62afec2a..167c92cb 100644 --- a/docs/examples/java/users/create-mfa-recovery-codes.md +++ b/docs/examples/java/users/create-mfa-recovery-codes.md @@ -9,7 +9,7 @@ Client client = new Client() Users users = new Users(client); -users.createMfaRecoveryCodes( +users.createMFARecoveryCodes( "", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/create-p-h-pass-user.md b/docs/examples/java/users/create-ph-pass-user.md similarity index 100% rename from docs/examples/java/users/create-p-h-pass-user.md rename to docs/examples/java/users/create-ph-pass-user.md diff --git a/docs/examples/java/users/create-s-h-a-user.md b/docs/examples/java/users/create-sha-user.md similarity index 100% rename from docs/examples/java/users/create-s-h-a-user.md rename to docs/examples/java/users/create-sha-user.md diff --git a/docs/examples/java/users/delete-m-f-a-authenticator.md b/docs/examples/java/users/delete-m-f-a-authenticator.md deleted file mode 100644 index c27b39ef..00000000 --- a/docs/examples/java/users/delete-m-f-a-authenticator.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Users; -import io.appwrite.enums.AuthenticatorType; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Users users = new Users(client); - -users.deleteMFAAuthenticator( - "", // userId - AuthenticatorType.TOTP, // type - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/users/delete-mfa-authenticator.md b/docs/examples/java/users/delete-mfa-authenticator.md index 7ed33d6d..c27b39ef 100644 --- a/docs/examples/java/users/delete-mfa-authenticator.md +++ b/docs/examples/java/users/delete-mfa-authenticator.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -users.deleteMfaAuthenticator( +users.deleteMFAAuthenticator( "", // userId AuthenticatorType.TOTP, // type new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/users/get-m-f-a-recovery-codes.md b/docs/examples/java/users/get-m-f-a-recovery-codes.md deleted file mode 100644 index e6173557..00000000 --- a/docs/examples/java/users/get-m-f-a-recovery-codes.md +++ /dev/null @@ -1,23 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Users; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Users users = new Users(client); - -users.getMFARecoveryCodes( - "", // userId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/users/get-mfa-recovery-codes.md b/docs/examples/java/users/get-mfa-recovery-codes.md index 940dafee..e6173557 100644 --- a/docs/examples/java/users/get-mfa-recovery-codes.md +++ b/docs/examples/java/users/get-mfa-recovery-codes.md @@ -9,7 +9,7 @@ Client client = new Client() Users users = new Users(client); -users.getMfaRecoveryCodes( +users.getMFARecoveryCodes( "", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/list-m-f-a-factors.md b/docs/examples/java/users/list-m-f-a-factors.md deleted file mode 100644 index c26f463b..00000000 --- a/docs/examples/java/users/list-m-f-a-factors.md +++ /dev/null @@ -1,23 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Users; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Users users = new Users(client); - -users.listMFAFactors( - "", // userId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/users/list-mfa-factors.md b/docs/examples/java/users/list-mfa-factors.md index a377214d..c26f463b 100644 --- a/docs/examples/java/users/list-mfa-factors.md +++ b/docs/examples/java/users/list-mfa-factors.md @@ -9,7 +9,7 @@ Client client = new Client() Users users = new Users(client); -users.listMfaFactors( +users.listMFAFactors( "", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-m-f-a-recovery-codes.md b/docs/examples/java/users/update-m-f-a-recovery-codes.md deleted file mode 100644 index 98522b62..00000000 --- a/docs/examples/java/users/update-m-f-a-recovery-codes.md +++ /dev/null @@ -1,23 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Users; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Users users = new Users(client); - -users.updateMFARecoveryCodes( - "", // userId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/users/update-m-f-a.md b/docs/examples/java/users/update-m-f-a.md deleted file mode 100644 index dbcded6d..00000000 --- a/docs/examples/java/users/update-m-f-a.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Users; - -Client client = new Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey(""); // Your secret API key - -Users users = new Users(client); - -users.updateMFA( - "", // userId - false, // mfa - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/users/update-mfa-recovery-codes.md b/docs/examples/java/users/update-mfa-recovery-codes.md index 43956101..98522b62 100644 --- a/docs/examples/java/users/update-mfa-recovery-codes.md +++ b/docs/examples/java/users/update-mfa-recovery-codes.md @@ -9,7 +9,7 @@ Client client = new Client() Users users = new Users(client); -users.updateMfaRecoveryCodes( +users.updateMFARecoveryCodes( "", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-mfa.md b/docs/examples/java/users/update-mfa.md index 76a198f5..dbcded6d 100644 --- a/docs/examples/java/users/update-mfa.md +++ b/docs/examples/java/users/update-mfa.md @@ -9,7 +9,7 @@ Client client = new Client() Users users = new Users(client); -users.updateMfa( +users.updateMFA( "", // userId false, // mfa new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/kotlin/account/create-j-w-t.md b/docs/examples/kotlin/account/create-jwt.md similarity index 100% rename from docs/examples/kotlin/account/create-j-w-t.md rename to docs/examples/kotlin/account/create-jwt.md diff --git a/docs/examples/kotlin/account/create-m-f-a-authenticator.md b/docs/examples/kotlin/account/create-m-f-a-authenticator.md deleted file mode 100644 index fed90b4a..00000000 --- a/docs/examples/kotlin/account/create-m-f-a-authenticator.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Account -import io.appwrite.enums.AuthenticatorType - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession("") // The user session to authenticate with - -val account = Account(client) - -val response = account.createMFAAuthenticator( - type = AuthenticatorType.TOTP -) diff --git a/docs/examples/kotlin/account/create-m-f-a-challenge.md b/docs/examples/kotlin/account/create-m-f-a-challenge.md deleted file mode 100644 index 7213142a..00000000 --- a/docs/examples/kotlin/account/create-m-f-a-challenge.md +++ /dev/null @@ -1,14 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Account -import io.appwrite.enums.AuthenticationFactor - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - -val account = Account(client) - -val response = account.createMFAChallenge( - factor = AuthenticationFactor.EMAIL -) diff --git a/docs/examples/kotlin/account/create-m-f-a-recovery-codes.md b/docs/examples/kotlin/account/create-m-f-a-recovery-codes.md deleted file mode 100644 index c01499b0..00000000 --- a/docs/examples/kotlin/account/create-m-f-a-recovery-codes.md +++ /dev/null @@ -1,12 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Account - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession("") // The user session to authenticate with - -val account = Account(client) - -val response = account.createMFARecoveryCodes() diff --git a/docs/examples/kotlin/account/create-magic-u-r-l-token.md b/docs/examples/kotlin/account/create-magic-url-token.md similarity index 100% rename from docs/examples/kotlin/account/create-magic-u-r-l-token.md rename to docs/examples/kotlin/account/create-magic-url-token.md diff --git a/docs/examples/kotlin/account/create-mfa-authenticator.md b/docs/examples/kotlin/account/create-mfa-authenticator.md index 803579da..fed90b4a 100644 --- a/docs/examples/kotlin/account/create-mfa-authenticator.md +++ b/docs/examples/kotlin/account/create-mfa-authenticator.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) -val response = account.createMfaAuthenticator( +val response = account.createMFAAuthenticator( type = AuthenticatorType.TOTP ) diff --git a/docs/examples/kotlin/account/create-mfa-challenge.md b/docs/examples/kotlin/account/create-mfa-challenge.md index a3fbe25d..7213142a 100644 --- a/docs/examples/kotlin/account/create-mfa-challenge.md +++ b/docs/examples/kotlin/account/create-mfa-challenge.md @@ -9,6 +9,6 @@ val client = Client() val account = Account(client) -val response = account.createMfaChallenge( +val response = account.createMFAChallenge( factor = AuthenticationFactor.EMAIL ) diff --git a/docs/examples/kotlin/account/create-mfa-recovery-codes.md b/docs/examples/kotlin/account/create-mfa-recovery-codes.md index c21a382f..c01499b0 100644 --- a/docs/examples/kotlin/account/create-mfa-recovery-codes.md +++ b/docs/examples/kotlin/account/create-mfa-recovery-codes.md @@ -9,4 +9,4 @@ val client = Client() val account = Account(client) -val response = account.createMfaRecoveryCodes() +val response = account.createMFARecoveryCodes() diff --git a/docs/examples/kotlin/account/create-o-auth2token.md b/docs/examples/kotlin/account/create-o-auth-2-token.md similarity index 100% rename from docs/examples/kotlin/account/create-o-auth2token.md rename to docs/examples/kotlin/account/create-o-auth-2-token.md diff --git a/docs/examples/kotlin/account/delete-m-f-a-authenticator.md b/docs/examples/kotlin/account/delete-m-f-a-authenticator.md deleted file mode 100644 index 9b06f8cd..00000000 --- a/docs/examples/kotlin/account/delete-m-f-a-authenticator.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Account -import io.appwrite.enums.AuthenticatorType - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession("") // The user session to authenticate with - -val account = Account(client) - -val response = account.deleteMFAAuthenticator( - type = AuthenticatorType.TOTP -) diff --git a/docs/examples/kotlin/account/delete-mfa-authenticator.md b/docs/examples/kotlin/account/delete-mfa-authenticator.md index 2068077f..9b06f8cd 100644 --- a/docs/examples/kotlin/account/delete-mfa-authenticator.md +++ b/docs/examples/kotlin/account/delete-mfa-authenticator.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) -val response = account.deleteMfaAuthenticator( +val response = account.deleteMFAAuthenticator( type = AuthenticatorType.TOTP ) diff --git a/docs/examples/kotlin/account/get-m-f-a-recovery-codes.md b/docs/examples/kotlin/account/get-m-f-a-recovery-codes.md deleted file mode 100644 index 96567f4c..00000000 --- a/docs/examples/kotlin/account/get-m-f-a-recovery-codes.md +++ /dev/null @@ -1,12 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Account - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession("") // The user session to authenticate with - -val account = Account(client) - -val response = account.getMFARecoveryCodes() diff --git a/docs/examples/kotlin/account/get-mfa-recovery-codes.md b/docs/examples/kotlin/account/get-mfa-recovery-codes.md index 027c2112..96567f4c 100644 --- a/docs/examples/kotlin/account/get-mfa-recovery-codes.md +++ b/docs/examples/kotlin/account/get-mfa-recovery-codes.md @@ -9,4 +9,4 @@ val client = Client() val account = Account(client) -val response = account.getMfaRecoveryCodes() +val response = account.getMFARecoveryCodes() diff --git a/docs/examples/kotlin/account/list-m-f-a-factors.md b/docs/examples/kotlin/account/list-m-f-a-factors.md deleted file mode 100644 index 0f073df3..00000000 --- a/docs/examples/kotlin/account/list-m-f-a-factors.md +++ /dev/null @@ -1,12 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Account - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession("") // The user session to authenticate with - -val account = Account(client) - -val response = account.listMFAFactors() diff --git a/docs/examples/kotlin/account/list-mfa-factors.md b/docs/examples/kotlin/account/list-mfa-factors.md index ce47dcd7..0f073df3 100644 --- a/docs/examples/kotlin/account/list-mfa-factors.md +++ b/docs/examples/kotlin/account/list-mfa-factors.md @@ -9,4 +9,4 @@ val client = Client() val account = Account(client) -val response = account.listMfaFactors() +val response = account.listMFAFactors() diff --git a/docs/examples/kotlin/account/update-m-f-a-authenticator.md b/docs/examples/kotlin/account/update-m-f-a-authenticator.md deleted file mode 100644 index 99764f2f..00000000 --- a/docs/examples/kotlin/account/update-m-f-a-authenticator.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Account -import io.appwrite.enums.AuthenticatorType - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession("") // The user session to authenticate with - -val account = Account(client) - -val response = account.updateMFAAuthenticator( - type = AuthenticatorType.TOTP, - otp = "" -) diff --git a/docs/examples/kotlin/account/update-m-f-a-challenge.md b/docs/examples/kotlin/account/update-m-f-a-challenge.md deleted file mode 100644 index de908736..00000000 --- a/docs/examples/kotlin/account/update-m-f-a-challenge.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Account - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession("") // The user session to authenticate with - -val account = Account(client) - -val response = account.updateMFAChallenge( - challengeId = "", - otp = "" -) diff --git a/docs/examples/kotlin/account/update-m-f-a-recovery-codes.md b/docs/examples/kotlin/account/update-m-f-a-recovery-codes.md deleted file mode 100644 index 05f6476e..00000000 --- a/docs/examples/kotlin/account/update-m-f-a-recovery-codes.md +++ /dev/null @@ -1,12 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Account - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setSession("") // The user session to authenticate with - -val account = Account(client) - -val response = account.updateMFARecoveryCodes() diff --git a/docs/examples/kotlin/account/update-magic-u-r-l-session.md b/docs/examples/kotlin/account/update-magic-url-session.md similarity index 100% rename from docs/examples/kotlin/account/update-magic-u-r-l-session.md rename to docs/examples/kotlin/account/update-magic-url-session.md diff --git a/docs/examples/kotlin/account/update-mfa-authenticator.md b/docs/examples/kotlin/account/update-mfa-authenticator.md index 521d133f..99764f2f 100644 --- a/docs/examples/kotlin/account/update-mfa-authenticator.md +++ b/docs/examples/kotlin/account/update-mfa-authenticator.md @@ -10,7 +10,7 @@ val client = Client() val account = Account(client) -val response = account.updateMfaAuthenticator( +val response = account.updateMFAAuthenticator( type = AuthenticatorType.TOTP, otp = "" ) diff --git a/docs/examples/kotlin/account/update-mfa-challenge.md b/docs/examples/kotlin/account/update-mfa-challenge.md index 6b978b76..de908736 100644 --- a/docs/examples/kotlin/account/update-mfa-challenge.md +++ b/docs/examples/kotlin/account/update-mfa-challenge.md @@ -9,7 +9,7 @@ val client = Client() val account = Account(client) -val response = account.updateMfaChallenge( +val response = account.updateMFAChallenge( challengeId = "", otp = "" ) diff --git a/docs/examples/kotlin/account/update-mfa-recovery-codes.md b/docs/examples/kotlin/account/update-mfa-recovery-codes.md index 31da824b..05f6476e 100644 --- a/docs/examples/kotlin/account/update-mfa-recovery-codes.md +++ b/docs/examples/kotlin/account/update-mfa-recovery-codes.md @@ -9,4 +9,4 @@ val client = Client() val account = Account(client) -val response = account.updateMfaRecoveryCodes() +val response = account.updateMFARecoveryCodes() diff --git a/docs/examples/kotlin/account/update-m-f-a.md b/docs/examples/kotlin/account/update-mfa.md similarity index 100% rename from docs/examples/kotlin/account/update-m-f-a.md rename to docs/examples/kotlin/account/update-mfa.md diff --git a/docs/examples/kotlin/avatars/get-q-r.md b/docs/examples/kotlin/avatars/get-qr.md similarity index 100% rename from docs/examples/kotlin/avatars/get-q-r.md rename to docs/examples/kotlin/avatars/get-qr.md diff --git a/docs/examples/kotlin/health/get-d-b.md b/docs/examples/kotlin/health/get-db.md similarity index 100% rename from docs/examples/kotlin/health/get-d-b.md rename to docs/examples/kotlin/health/get-db.md diff --git a/docs/examples/kotlin/locale/list-countries-e-u.md b/docs/examples/kotlin/locale/list-countries-eu.md similarity index 100% rename from docs/examples/kotlin/locale/list-countries-e-u.md rename to docs/examples/kotlin/locale/list-countries-eu.md diff --git a/docs/examples/kotlin/messaging/create-a-p-n-s-provider.md b/docs/examples/kotlin/messaging/create-a-p-n-s-provider.md deleted file mode 100644 index 5104edf3..00000000 --- a/docs/examples/kotlin/messaging/create-a-p-n-s-provider.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Messaging - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val messaging = Messaging(client) - -val response = messaging.createAPNSProvider( - providerId = "", - name = "", - authKey = "", // optional - authKeyId = "", // optional - teamId = "", // optional - bundleId = "", // optional - sandbox = false, // optional - enabled = false // optional -) diff --git a/docs/examples/kotlin/messaging/create-apns-provider.md b/docs/examples/kotlin/messaging/create-apns-provider.md index a19cbe27..5104edf3 100644 --- a/docs/examples/kotlin/messaging/create-apns-provider.md +++ b/docs/examples/kotlin/messaging/create-apns-provider.md @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.createApnsProvider( +val response = messaging.createAPNSProvider( providerId = "", name = "", authKey = "", // optional diff --git a/docs/examples/kotlin/messaging/create-f-c-m-provider.md b/docs/examples/kotlin/messaging/create-f-c-m-provider.md deleted file mode 100644 index b1a2ef83..00000000 --- a/docs/examples/kotlin/messaging/create-f-c-m-provider.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Messaging - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val messaging = Messaging(client) - -val response = messaging.createFCMProvider( - providerId = "", - name = "", - serviceAccountJSON = mapOf( "a" to "b" ), // optional - enabled = false // optional -) diff --git a/docs/examples/kotlin/messaging/create-fcm-provider.md b/docs/examples/kotlin/messaging/create-fcm-provider.md index c1a077ca..b1a2ef83 100644 --- a/docs/examples/kotlin/messaging/create-fcm-provider.md +++ b/docs/examples/kotlin/messaging/create-fcm-provider.md @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.createFcmProvider( +val response = messaging.createFCMProvider( providerId = "", name = "", serviceAccountJSON = mapOf( "a" to "b" ), // optional diff --git a/docs/examples/kotlin/messaging/create-msg91provider.md b/docs/examples/kotlin/messaging/create-msg-91-provider.md similarity index 100% rename from docs/examples/kotlin/messaging/create-msg91provider.md rename to docs/examples/kotlin/messaging/create-msg-91-provider.md diff --git a/docs/examples/kotlin/messaging/create-s-m-s.md b/docs/examples/kotlin/messaging/create-s-m-s.md deleted file mode 100644 index 54c06eb3..00000000 --- a/docs/examples/kotlin/messaging/create-s-m-s.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Messaging - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val messaging = Messaging(client) - -val response = messaging.createSMS( - messageId = "", - content = "", - topics = listOf(), // optional - users = listOf(), // optional - targets = listOf(), // optional - draft = false, // optional - scheduledAt = "" // optional -) diff --git a/docs/examples/kotlin/messaging/create-s-m-t-p-provider.md b/docs/examples/kotlin/messaging/create-s-m-t-p-provider.md deleted file mode 100644 index ce50130e..00000000 --- a/docs/examples/kotlin/messaging/create-s-m-t-p-provider.md +++ /dev/null @@ -1,27 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Messaging - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val messaging = Messaging(client) - -val response = messaging.createSMTPProvider( - providerId = "", - name = "", - host = "", - port = 1, // optional - username = "", // optional - password = "", // optional - encryption = "none", // optional - autoTLS = false, // optional - mailer = "", // optional - fromName = "", // optional - fromEmail = "email@example.com", // optional - replyToName = "", // optional - replyToEmail = "email@example.com", // optional - enabled = false // optional -) diff --git a/docs/examples/kotlin/messaging/create-sms.md b/docs/examples/kotlin/messaging/create-sms.md index 49185290..54c06eb3 100644 --- a/docs/examples/kotlin/messaging/create-sms.md +++ b/docs/examples/kotlin/messaging/create-sms.md @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.createSms( +val response = messaging.createSMS( messageId = "", content = "", topics = listOf(), // optional diff --git a/docs/examples/kotlin/messaging/create-smtp-provider.md b/docs/examples/kotlin/messaging/create-smtp-provider.md index ae3b6678..ce50130e 100644 --- a/docs/examples/kotlin/messaging/create-smtp-provider.md +++ b/docs/examples/kotlin/messaging/create-smtp-provider.md @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.createSmtpProvider( +val response = messaging.createSMTPProvider( providerId = "", name = "", host = "", diff --git a/docs/examples/kotlin/messaging/update-a-p-n-s-provider.md b/docs/examples/kotlin/messaging/update-a-p-n-s-provider.md deleted file mode 100644 index 29b436e4..00000000 --- a/docs/examples/kotlin/messaging/update-a-p-n-s-provider.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Messaging - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val messaging = Messaging(client) - -val response = messaging.updateAPNSProvider( - providerId = "", - name = "", // optional - enabled = false, // optional - authKey = "", // optional - authKeyId = "", // optional - teamId = "", // optional - bundleId = "", // optional - sandbox = false // optional -) diff --git a/docs/examples/kotlin/messaging/update-apns-provider.md b/docs/examples/kotlin/messaging/update-apns-provider.md index d0d5a078..29b436e4 100644 --- a/docs/examples/kotlin/messaging/update-apns-provider.md +++ b/docs/examples/kotlin/messaging/update-apns-provider.md @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.updateApnsProvider( +val response = messaging.updateAPNSProvider( providerId = "", name = "", // optional enabled = false, // optional diff --git a/docs/examples/kotlin/messaging/update-f-c-m-provider.md b/docs/examples/kotlin/messaging/update-f-c-m-provider.md deleted file mode 100644 index 84e5635f..00000000 --- a/docs/examples/kotlin/messaging/update-f-c-m-provider.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Messaging - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val messaging = Messaging(client) - -val response = messaging.updateFCMProvider( - providerId = "", - name = "", // optional - enabled = false, // optional - serviceAccountJSON = mapOf( "a" to "b" ) // optional -) diff --git a/docs/examples/kotlin/messaging/update-fcm-provider.md b/docs/examples/kotlin/messaging/update-fcm-provider.md index 477e7188..84e5635f 100644 --- a/docs/examples/kotlin/messaging/update-fcm-provider.md +++ b/docs/examples/kotlin/messaging/update-fcm-provider.md @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.updateFcmProvider( +val response = messaging.updateFCMProvider( providerId = "", name = "", // optional enabled = false, // optional diff --git a/docs/examples/kotlin/messaging/update-msg91provider.md b/docs/examples/kotlin/messaging/update-msg-91-provider.md similarity index 100% rename from docs/examples/kotlin/messaging/update-msg91provider.md rename to docs/examples/kotlin/messaging/update-msg-91-provider.md diff --git a/docs/examples/kotlin/messaging/update-s-m-s.md b/docs/examples/kotlin/messaging/update-s-m-s.md deleted file mode 100644 index 534e9add..00000000 --- a/docs/examples/kotlin/messaging/update-s-m-s.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Messaging - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val messaging = Messaging(client) - -val response = messaging.updateSMS( - messageId = "", - topics = listOf(), // optional - users = listOf(), // optional - targets = listOf(), // optional - content = "", // optional - draft = false, // optional - scheduledAt = "" // optional -) diff --git a/docs/examples/kotlin/messaging/update-s-m-t-p-provider.md b/docs/examples/kotlin/messaging/update-s-m-t-p-provider.md deleted file mode 100644 index 7652e531..00000000 --- a/docs/examples/kotlin/messaging/update-s-m-t-p-provider.md +++ /dev/null @@ -1,27 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Messaging - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val messaging = Messaging(client) - -val response = messaging.updateSMTPProvider( - providerId = "", - name = "", // optional - host = "", // optional - port = 1, // optional - username = "", // optional - password = "", // optional - encryption = "none", // optional - autoTLS = false, // optional - mailer = "", // optional - fromName = "", // optional - fromEmail = "email@example.com", // optional - replyToName = "", // optional - replyToEmail = "", // optional - enabled = false // optional -) diff --git a/docs/examples/kotlin/messaging/update-sms.md b/docs/examples/kotlin/messaging/update-sms.md index 3d08b8a1..534e9add 100644 --- a/docs/examples/kotlin/messaging/update-sms.md +++ b/docs/examples/kotlin/messaging/update-sms.md @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.updateSms( +val response = messaging.updateSMS( messageId = "", topics = listOf(), // optional users = listOf(), // optional diff --git a/docs/examples/kotlin/messaging/update-smtp-provider.md b/docs/examples/kotlin/messaging/update-smtp-provider.md index cb745865..7652e531 100644 --- a/docs/examples/kotlin/messaging/update-smtp-provider.md +++ b/docs/examples/kotlin/messaging/update-smtp-provider.md @@ -9,7 +9,7 @@ val client = Client() val messaging = Messaging(client) -val response = messaging.updateSmtpProvider( +val response = messaging.updateSMTPProvider( providerId = "", name = "", // optional host = "", // optional diff --git a/docs/examples/kotlin/users/create-argon2user.md b/docs/examples/kotlin/users/create-argon-2-user.md similarity index 100% rename from docs/examples/kotlin/users/create-argon2user.md rename to docs/examples/kotlin/users/create-argon-2-user.md diff --git a/docs/examples/kotlin/users/create-j-w-t.md b/docs/examples/kotlin/users/create-jwt.md similarity index 100% rename from docs/examples/kotlin/users/create-j-w-t.md rename to docs/examples/kotlin/users/create-jwt.md diff --git a/docs/examples/kotlin/users/create-m-f-a-recovery-codes.md b/docs/examples/kotlin/users/create-m-f-a-recovery-codes.md deleted file mode 100644 index 7a0b1c61..00000000 --- a/docs/examples/kotlin/users/create-m-f-a-recovery-codes.md +++ /dev/null @@ -1,14 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Users - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val users = Users(client) - -val response = users.createMFARecoveryCodes( - userId = "" -) diff --git a/docs/examples/kotlin/users/create-m-d5user.md b/docs/examples/kotlin/users/create-md-5-user.md similarity index 100% rename from docs/examples/kotlin/users/create-m-d5user.md rename to docs/examples/kotlin/users/create-md-5-user.md diff --git a/docs/examples/kotlin/users/create-mfa-recovery-codes.md b/docs/examples/kotlin/users/create-mfa-recovery-codes.md index 2d1dbf0a..7a0b1c61 100644 --- a/docs/examples/kotlin/users/create-mfa-recovery-codes.md +++ b/docs/examples/kotlin/users/create-mfa-recovery-codes.md @@ -9,6 +9,6 @@ val client = Client() val users = Users(client) -val response = users.createMfaRecoveryCodes( +val response = users.createMFARecoveryCodes( userId = "" ) diff --git a/docs/examples/kotlin/users/create-p-h-pass-user.md b/docs/examples/kotlin/users/create-ph-pass-user.md similarity index 100% rename from docs/examples/kotlin/users/create-p-h-pass-user.md rename to docs/examples/kotlin/users/create-ph-pass-user.md diff --git a/docs/examples/kotlin/users/create-s-h-a-user.md b/docs/examples/kotlin/users/create-sha-user.md similarity index 100% rename from docs/examples/kotlin/users/create-s-h-a-user.md rename to docs/examples/kotlin/users/create-sha-user.md diff --git a/docs/examples/kotlin/users/delete-m-f-a-authenticator.md b/docs/examples/kotlin/users/delete-m-f-a-authenticator.md deleted file mode 100644 index a7c80893..00000000 --- a/docs/examples/kotlin/users/delete-m-f-a-authenticator.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Users -import io.appwrite.enums.AuthenticatorType - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val users = Users(client) - -val response = users.deleteMFAAuthenticator( - userId = "", - type = AuthenticatorType.TOTP -) diff --git a/docs/examples/kotlin/users/delete-mfa-authenticator.md b/docs/examples/kotlin/users/delete-mfa-authenticator.md index 22085b2f..a7c80893 100644 --- a/docs/examples/kotlin/users/delete-mfa-authenticator.md +++ b/docs/examples/kotlin/users/delete-mfa-authenticator.md @@ -10,7 +10,7 @@ val client = Client() val users = Users(client) -val response = users.deleteMfaAuthenticator( +val response = users.deleteMFAAuthenticator( userId = "", type = AuthenticatorType.TOTP ) diff --git a/docs/examples/kotlin/users/get-m-f-a-recovery-codes.md b/docs/examples/kotlin/users/get-m-f-a-recovery-codes.md deleted file mode 100644 index 1ad91975..00000000 --- a/docs/examples/kotlin/users/get-m-f-a-recovery-codes.md +++ /dev/null @@ -1,14 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Users - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val users = Users(client) - -val response = users.getMFARecoveryCodes( - userId = "" -) diff --git a/docs/examples/kotlin/users/get-mfa-recovery-codes.md b/docs/examples/kotlin/users/get-mfa-recovery-codes.md index e0c45dc2..1ad91975 100644 --- a/docs/examples/kotlin/users/get-mfa-recovery-codes.md +++ b/docs/examples/kotlin/users/get-mfa-recovery-codes.md @@ -9,6 +9,6 @@ val client = Client() val users = Users(client) -val response = users.getMfaRecoveryCodes( +val response = users.getMFARecoveryCodes( userId = "" ) diff --git a/docs/examples/kotlin/users/list-m-f-a-factors.md b/docs/examples/kotlin/users/list-m-f-a-factors.md deleted file mode 100644 index 9d0791cf..00000000 --- a/docs/examples/kotlin/users/list-m-f-a-factors.md +++ /dev/null @@ -1,14 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Users - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val users = Users(client) - -val response = users.listMFAFactors( - userId = "" -) diff --git a/docs/examples/kotlin/users/list-mfa-factors.md b/docs/examples/kotlin/users/list-mfa-factors.md index 4eb6721c..9d0791cf 100644 --- a/docs/examples/kotlin/users/list-mfa-factors.md +++ b/docs/examples/kotlin/users/list-mfa-factors.md @@ -9,6 +9,6 @@ val client = Client() val users = Users(client) -val response = users.listMfaFactors( +val response = users.listMFAFactors( userId = "" ) diff --git a/docs/examples/kotlin/users/update-m-f-a-recovery-codes.md b/docs/examples/kotlin/users/update-m-f-a-recovery-codes.md deleted file mode 100644 index 80b92b45..00000000 --- a/docs/examples/kotlin/users/update-m-f-a-recovery-codes.md +++ /dev/null @@ -1,14 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Users - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val users = Users(client) - -val response = users.updateMFARecoveryCodes( - userId = "" -) diff --git a/docs/examples/kotlin/users/update-m-f-a.md b/docs/examples/kotlin/users/update-m-f-a.md deleted file mode 100644 index d2f448e0..00000000 --- a/docs/examples/kotlin/users/update-m-f-a.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Users - -val client = Client() - .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("") // Your project ID - .setKey("") // Your secret API key - -val users = Users(client) - -val response = users.updateMFA( - userId = "", - mfa = false -) diff --git a/docs/examples/kotlin/users/update-mfa-recovery-codes.md b/docs/examples/kotlin/users/update-mfa-recovery-codes.md index 74602c0f..80b92b45 100644 --- a/docs/examples/kotlin/users/update-mfa-recovery-codes.md +++ b/docs/examples/kotlin/users/update-mfa-recovery-codes.md @@ -9,6 +9,6 @@ val client = Client() val users = Users(client) -val response = users.updateMfaRecoveryCodes( +val response = users.updateMFARecoveryCodes( userId = "" ) diff --git a/docs/examples/kotlin/users/update-mfa.md b/docs/examples/kotlin/users/update-mfa.md index 0148d582..d2f448e0 100644 --- a/docs/examples/kotlin/users/update-mfa.md +++ b/docs/examples/kotlin/users/update-mfa.md @@ -9,7 +9,7 @@ val client = Client() val users = Users(client) -val response = users.updateMfa( +val response = users.updateMFA( userId = "", mfa = false )