Fix casing

This commit is contained in:
Jake Barnby
2025-08-21 22:16:00 +12:00
parent bbe7107fde
commit 07bf470d9c
56 changed files with 852 additions and 142 deletions
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.AuthenticatorType;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createMFAAuthenticator(
AuthenticatorType.TOTP, // type
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -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(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createMFAChallenge(
AuthenticationFactor.EMAIL, // factor
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.createMFARecoveryCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.AuthenticatorType;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.deleteMFAAuthenticator(
AuthenticatorType.TOTP, // type
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.getMFARecoveryCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.listMFAFactors(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -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(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateMFAAuthenticator(
AuthenticatorType.TOTP, // type
"<OTP>", // otp
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateMFAChallenge(
"<CHALLENGE_ID>", // challengeId
"<OTP>", // otp
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updateMFARecoveryCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
+3 -3
View File
@@ -1,14 +1,14 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
import io.appwrite.services.TablesDB;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
TablesDB tablesDB = new TablesDB(client);
tablesDb.createRow(
tablesDB.createRow(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
@@ -1,14 +1,14 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
import io.appwrite.services.TablesDB;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
TablesDB tablesDB = new TablesDB(client);
tablesDb.decrementRowColumn(
tablesDB.decrementRowColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
+3 -3
View File
@@ -1,14 +1,14 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
import io.appwrite.services.TablesDB;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
TablesDB tablesDB = new TablesDB(client);
tablesDb.deleteRow(
tablesDB.deleteRow(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
+3 -3
View File
@@ -1,14 +1,14 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
import io.appwrite.services.TablesDB;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
TablesDB tablesDB = new TablesDB(client);
tablesDb.getRow(
tablesDB.getRow(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
@@ -1,14 +1,14 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
import io.appwrite.services.TablesDB;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
TablesDB tablesDB = new TablesDB(client);
tablesDb.incrementRowColumn(
tablesDB.incrementRowColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
+3 -3
View File
@@ -1,14 +1,14 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
import io.appwrite.services.TablesDB;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
TablesDB tablesDB = new TablesDB(client);
tablesDb.listRows(
tablesDB.listRows(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
listOf(), // queries (optional)
+3 -3
View File
@@ -1,14 +1,14 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
import io.appwrite.services.TablesDB;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
TablesDB tablesDB = new TablesDB(client);
tablesDb.updateRow(
tablesDB.updateRow(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
+3 -3
View File
@@ -1,14 +1,14 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDb;
import io.appwrite.services.TablesDB;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
TablesDb tablesDb = new TablesDb(client);
TablesDB tablesDB = new TablesDB(client);
tablesDb.upsertRow(
tablesDB.upsertRow(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
@@ -0,0 +1,14 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
import io.appwrite.enums.AuthenticatorType
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val account = Account(client)
val result = account.createMFAAuthenticator(
type = AuthenticatorType.TOTP,
)
@@ -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(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val account = Account(client)
val result = account.createMFAChallenge(
factor = AuthenticationFactor.EMAIL,
)
@@ -0,0 +1,11 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val account = Account(client)
val result = account.createMFARecoveryCodes()
@@ -0,0 +1,14 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
import io.appwrite.enums.AuthenticatorType
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val account = Account(client)
val result = account.deleteMFAAuthenticator(
type = AuthenticatorType.TOTP,
)
@@ -0,0 +1,11 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val account = Account(client)
val result = account.getMFARecoveryCodes()
@@ -0,0 +1,11 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val account = Account(client)
val result = account.listMFAFactors()
@@ -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(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val account = Account(client)
val result = account.updateMFAAuthenticator(
type = AuthenticatorType.TOTP,
otp = "<OTP>",
)
@@ -0,0 +1,14 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val account = Account(client)
val result = account.updateMFAChallenge(
challengeId = "<CHALLENGE_ID>",
otp = "<OTP>",
)
@@ -0,0 +1,11 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val account = Account(client)
val result = account.updateMFARecoveryCodes()
+3 -3
View File
@@ -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(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val tablesDB = TablesDB(client)
val result = tablesDb.createRow(
val result = tablesDB.createRow(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
@@ -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(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val tablesDB = TablesDB(client)
val result = tablesDb.decrementRowColumn(
val result = tablesDB.decrementRowColumn(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
+3 -3
View File
@@ -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(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val tablesDB = TablesDB(client)
val result = tablesDb.deleteRow(
val result = tablesDB.deleteRow(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
+3 -3
View File
@@ -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(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val tablesDB = TablesDB(client)
val result = tablesDb.getRow(
val result = tablesDB.getRow(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
@@ -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(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val tablesDB = TablesDB(client)
val result = tablesDb.incrementRowColumn(
val result = tablesDB.incrementRowColumn(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
+3 -3
View File
@@ -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(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val tablesDB = TablesDB(client)
val result = tablesDb.listRows(
val result = tablesDB.listRows(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
queries = listOf(), // (optional)
+3 -3
View File
@@ -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(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val tablesDB = TablesDB(client)
val result = tablesDb.updateRow(
val result = tablesDB.updateRow(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
+3 -3
View File
@@ -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(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val tablesDb = TablesDb(client)
val tablesDB = TablesDB(client)
val result = tablesDb.upsertRow(
val result = tablesDB.upsertRow(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
@@ -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,
@@ -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,
@@ -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,
@@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast
*/
data class DocumentList<T>(
/**
* Total number of documents rows that matched your query.
* Total number of documents that matched your query.
*/
@SerializedName("total")
val total: Long,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast
*/
data class RowList<T>(
/**
* Total number of rows rows that matched your query.
* Total number of rows that matched your query.
*/
@SerializedName("total")
val total: Long,
@@ -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,
@@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast
*/
data class TeamList<T>(
/**
* Total number of teams rows that matched your query.
* Total number of teams that matched your query.
*/
@SerializedName("total")
val total: Long,
@@ -125,7 +125,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.
@@ -348,6 +350,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"
)
suspend fun createMfaAuthenticator(
type: io.appwrite.enums.AuthenticatorType,
): io.appwrite.models.MfaType {
@@ -374,6 +381,38 @@ 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]
*/
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<String, Any?>(
)
val apiHeaders = mutableMapOf<String, String>(
"content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.MfaType = {
@Suppress("UNCHECKED_CAST")
io.appwrite.models.MfaType.from(map = it as Map<String, Any>)
}
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.
*
@@ -381,6 +420,11 @@ class Account(client: Client) : Service(client) {
* @param otp Valid verification token.
* @return [io.appwrite.models.User<T>]
*/
@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"
)
suspend fun <T> updateMfaAuthenticator(
type: io.appwrite.enums.AuthenticatorType,
otp: String,
@@ -416,6 +460,11 @@ class Account(client: Client) : Service(client) {
* @param otp Valid verification token.
* @return [io.appwrite.models.User<T>]
*/
@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,
@@ -426,12 +475,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<T>]
*/
suspend fun <T> updateMFAAuthenticator(
type: io.appwrite.enums.AuthenticatorType,
otp: String,
nestedType: Class<T>,
): io.appwrite.models.User<T> {
val apiPath = "/account/mfa/authenticators/{type}"
.replace("{type}", type.value)
val apiParams = mutableMapOf<String, Any?>(
"otp" to otp,
)
val apiHeaders = mutableMapOf<String, String>(
"content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.User<T> = {
@Suppress("UNCHECKED_CAST")
io.appwrite.models.User.from(map = it as Map<String, Any>, 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<T>]
*/
@Throws(AppwriteException::class)
suspend fun updateMFAAuthenticator(
type: io.appwrite.enums.AuthenticatorType,
otp: String,
): io.appwrite.models.User<Map<String, Any>> = 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"
)
suspend fun deleteMfaAuthenticator(
type: io.appwrite.enums.AuthenticatorType,
): Any {
@@ -453,12 +559,44 @@ class Account(client: Client) : Service(client) {
}
/**
* Delete an authenticator for a user by ID.
*
* @param type Type of authenticator.
* @return [Any]
*/
suspend fun deleteMFAAuthenticator(
type: io.appwrite.enums.AuthenticatorType,
): Any {
val apiPath = "/account/mfa/authenticators/{type}"
.replace("{type}", type.value)
val apiParams = mutableMapOf<String, Any?>(
)
val apiHeaders = mutableMapOf<String, String>(
"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"
)
suspend fun createMfaChallenge(
factor: io.appwrite.enums.AuthenticationFactor,
): io.appwrite.models.MfaChallenge {
@@ -485,6 +623,38 @@ 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]
*/
suspend fun createMFAChallenge(
factor: io.appwrite.enums.AuthenticationFactor,
): io.appwrite.models.MfaChallenge {
val apiPath = "/account/mfa/challenge"
val apiParams = mutableMapOf<String, Any?>(
"factor" to factor,
)
val apiHeaders = mutableMapOf<String, String>(
"content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.MfaChallenge = {
@Suppress("UNCHECKED_CAST")
io.appwrite.models.MfaChallenge.from(map = it as Map<String, Any>)
}
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.
*
@@ -492,6 +662,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"
)
suspend fun updateMfaChallenge(
challengeId: String,
otp: String,
@@ -520,11 +695,51 @@ 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]
*/
suspend fun updateMFAChallenge(
challengeId: String,
otp: String,
): io.appwrite.models.Session {
val apiPath = "/account/mfa/challenge"
val apiParams = mutableMapOf<String, Any?>(
"challengeId" to challengeId,
"otp" to otp,
)
val apiHeaders = mutableMapOf<String, String>(
"content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.Session = {
@Suppress("UNCHECKED_CAST")
io.appwrite.models.Session.from(map = it as Map<String, Any>)
}
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"
)
suspend fun listMfaFactors(
): io.appwrite.models.MfaFactors {
val apiPath = "/account/mfa/factors"
@@ -548,11 +763,44 @@ 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]
*/
suspend fun listMFAFactors(
): io.appwrite.models.MfaFactors {
val apiPath = "/account/mfa/factors"
val apiParams = mutableMapOf<String, Any?>(
)
val apiHeaders = mutableMapOf<String, String>(
)
val converter: (Any) -> io.appwrite.models.MfaFactors = {
@Suppress("UNCHECKED_CAST")
io.appwrite.models.MfaFactors.from(map = it as Map<String, Any>)
}
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"
)
suspend fun getMfaRecoveryCodes(
): io.appwrite.models.MfaRecoveryCodes {
val apiPath = "/account/mfa/recovery-codes"
@@ -577,10 +825,43 @@ class Account(client: Client) : Service(client) {
/**
* Generate recovery codes as backup for MFA flow. It&#039;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]
*/
suspend fun getMFARecoveryCodes(
): io.appwrite.models.MfaRecoveryCodes {
val apiPath = "/account/mfa/recovery-codes"
val apiParams = mutableMapOf<String, Any?>(
)
val apiHeaders = mutableMapOf<String, String>(
)
val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = {
@Suppress("UNCHECKED_CAST")
io.appwrite.models.MfaRecoveryCodes.from(map = it as Map<String, Any>)
}
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"
)
suspend fun createMfaRecoveryCodes(
): io.appwrite.models.MfaRecoveryCodes {
val apiPath = "/account/mfa/recovery-codes"
@@ -605,11 +886,45 @@ 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]
*/
suspend fun createMFARecoveryCodes(
): io.appwrite.models.MfaRecoveryCodes {
val apiPath = "/account/mfa/recovery-codes"
val apiParams = mutableMapOf<String, Any?>(
)
val apiHeaders = mutableMapOf<String, String>(
"content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = {
@Suppress("UNCHECKED_CAST")
io.appwrite.models.MfaRecoveryCodes.from(map = it as Map<String, Any>)
}
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"
)
suspend fun updateMfaRecoveryCodes(
): io.appwrite.models.MfaRecoveryCodes {
val apiPath = "/account/mfa/recovery-codes"
@@ -634,6 +949,35 @@ 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]
*/
suspend fun updateMFARecoveryCodes(
): io.appwrite.models.MfaRecoveryCodes {
val apiPath = "/account/mfa/recovery-codes"
val apiParams = mutableMapOf<String, Any?>(
)
val apiHeaders = mutableMapOf<String, String>(
"content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = {
@Suppress("UNCHECKED_CAST")
io.appwrite.models.MfaRecoveryCodes.from(map = it as Map<String, Any>)
}
return client.call(
"PATCH",
apiPath,
apiHeaders,
apiParams,
responseType = io.appwrite.models.MfaRecoveryCodes::class.java,
converter,
)
}
/**
* Update currently logged in user account name.
*
@@ -735,7 +1079,7 @@ class Account(client: Client) : Service(client) {
)
/**
* Update the currently logged in user&#039;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.
@@ -872,7 +1216,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&#039;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.
@@ -907,7 +1251,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.
@@ -1026,7 +1372,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.
@@ -1099,7 +1447,12 @@ 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&#039;s back to your app when login is completed.If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new 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 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 there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new 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 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.
@@ -1244,7 +1597,7 @@ class Account(client: Client) : Service(client) {
/**
* Use this endpoint to get a logged in user&#039;s session using a Session ID. Inputting &#039;current&#039; 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]
@@ -1275,7 +1628,7 @@ class Account(client: Client) : Service(client) {
/**
* Use this endpoint to extend a session&#039;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]
@@ -1307,7 +1660,7 @@ class Account(client: Client) : Service(client) {
/**
* Logout the user. Use &#039;current&#039; as the session ID to logout on this device, use a session ID to logout on another device. If you&#039;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]
@@ -1413,7 +1766,7 @@ class Account(client: Client) : Service(client) {
/**
* Update the currently logged in user&#039;s push notification target. You can modify the target&#039;s identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.
* Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.
*
* @param targetId Target ID.
* @param identifier The target identifier (token, email, phone etc.)
@@ -1475,7 +1828,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&#039;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.
@@ -1514,7 +1869,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&#039;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.
@@ -1556,7 +1914,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&#039;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.
@@ -1628,7 +1990,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&#039;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.
@@ -1663,7 +2027,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&#039;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]
@@ -1730,7 +2097,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&#039;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&#039;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]
*/
@@ -1759,7 +2126,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&#039;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.
@@ -18,7 +18,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.
@@ -52,7 +54,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]
@@ -110,7 +117,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.
@@ -144,7 +154,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.
@@ -175,7 +189,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 &#039;name&#039; 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&#039;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.
@@ -210,6 +229,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.
@@ -16,7 +16,7 @@ import java.io.File
class Databases(client: Client) : Service(client) {
/**
* Get a list of all the user&#039;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).
@@ -24,8 +24,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.DocumentList<T>]
*/
@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
@@ -67,8 +67,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.DocumentList<T>]
*/
@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
@@ -95,8 +95,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.Document<T>]
*/
@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
@@ -145,8 +145,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.Document<T>]
*/
@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
@@ -176,8 +176,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.Document<T>]
*/
@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
@@ -222,8 +222,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.Document<T>]
*/
@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
@@ -252,8 +252,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.Document<T>]
*/
@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
@@ -302,8 +302,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.Document<T>]
*/
@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
@@ -334,8 +334,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.Document<T>]
*/
@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
@@ -384,8 +384,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.Document<T>]
*/
@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
@@ -414,8 +414,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"
)
suspend fun deleteDocument(
@@ -455,8 +455,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.Document<T>]
*/
@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
@@ -508,8 +508,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.Document<T>]
*/
@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
@@ -543,8 +543,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.Document<T>]
*/
@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
@@ -596,8 +596,8 @@ class Databases(client: Client) : Service(client) {
* @return [io.appwrite.models.Document<T>]
*/
@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
@@ -11,12 +11,14 @@ import okhttp3.Cookie
import java.io.File
/**
* The Locale service allows you to customize your app based on your users&#039; 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]
*/
@@ -56,7 +56,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&#039;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&#039;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.
@@ -209,7 +216,7 @@ class Storage(client: Client) : Service(client) {
/**
* Get a file content by its unique ID. The endpoint response return with a &#039;Content-Disposition: attachment&#039; 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.
@@ -304,7 +311,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 &#039;Content-Disposition: attachment&#039; 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.
@@ -13,13 +13,13 @@ import java.io.File
/**
*
**/
class TablesDb(client: Client) : Service(client) {
class TablesDB(client: Client) : Service(client) {
/**
* Get a list of all the user&#039;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<T>]
*/
@@ -57,7 +57,7 @@ class TablesDb(client: Client) : Service(client) {
* Get a list of all the user&#039;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<T>]
*/
@@ -75,10 +75,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).
@@ -120,10 +120,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).
@@ -150,7 +150,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<T>]
@@ -191,7 +191,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<T>]
@@ -212,7 +212,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.
@@ -257,7 +257,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.
@@ -359,7 +359,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]
*/
@@ -174,7 +174,7 @@ class Teams(client: Client) : Service(client) {
)
/**
* Update the team&#039;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.
@@ -253,7 +253,7 @@ class Teams(client: Client) : Service(client) {
/**
* Use this endpoint to list a team&#039;s members using the team&#039;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
@@ -291,7 +291,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&#039;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 &gt; email &gt; 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.
@@ -377,6 +384,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.
@@ -444,7 +452,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.
@@ -485,7 +496,7 @@ class Teams(client: Client) : Service(client) {
/**
* Get the team&#039;s shared preferences by its unique ID. If a preference doesn&#039;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<T>]
@@ -530,7 +541,7 @@ class Teams(client: Client) : Service(client) {
)
/**
* Update the team&#039;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.