From b23d6bd1c2fe77e66a7eef81c22bb2e6c25df08a Mon Sep 17 00:00:00 2001
From: loks0n <22452787+loks0n@users.noreply.github.com>
Date: Thu, 17 Apr 2025 19:46:56 +0100
Subject: [PATCH] fix: remove content-type from GET requests
---
README.md | 6 +-
library/src/main/java/io/appwrite/Client.kt | 32 +++--
.../main/java/io/appwrite/enums/CreditCard.kt | 4 +-
.../java/io/appwrite/enums/OAuthProvider.kt | 2 +
.../main/java/io/appwrite/services/Account.kt | 128 +-----------------
.../main/java/io/appwrite/services/Avatars.kt | 16 +--
.../java/io/appwrite/services/Databases.kt | 20 ---
.../java/io/appwrite/services/Functions.kt | 8 --
.../main/java/io/appwrite/services/Graphql.kt | 4 -
.../main/java/io/appwrite/services/Locale.kt | 24 ----
.../java/io/appwrite/services/Messaging.kt | 4 -
.../main/java/io/appwrite/services/Storage.kt | 18 ---
.../main/java/io/appwrite/services/Teams.kt | 43 ------
13 files changed, 31 insertions(+), 278 deletions(-)
diff --git a/README.md b/README.md
index 0698a2c..9edac18 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@


-
+
[](https://travis-ci.com/appwrite/sdk-generator)
[](https://twitter.com/appwrite)
[](https://appwrite.io/discord)
@@ -38,7 +38,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:
```groovy
-implementation("io.appwrite:sdk-for-android:7.0.0")
+implementation("io.appwrite:sdk-for-android:7.0.1")
```
### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
io.appwrite
sdk-for-android
- 7.0.0
+ 7.0.1
```
diff --git a/library/src/main/java/io/appwrite/Client.kt b/library/src/main/java/io/appwrite/Client.kt
index 409dc92..909e62f 100644
--- a/library/src/main/java/io/appwrite/Client.kt
+++ b/library/src/main/java/io/appwrite/Client.kt
@@ -25,6 +25,7 @@ import java.io.BufferedReader
import java.io.File
import java.io.RandomAccessFile
import java.io.IOException
+import java.lang.IllegalArgumentException
import java.net.CookieManager
import java.net.CookiePolicy
import java.security.SecureRandom
@@ -86,7 +87,7 @@ class Client @JvmOverloads constructor(
"x-sdk-name" to "Android",
"x-sdk-platform" to "client",
"x-sdk-language" to "android",
- "x-sdk-version" to "7.0.0",
+ "x-sdk-version" to "7.0.1",
"x-appwrite-response-format" to "1.6.0"
)
config = mutableMapOf()
@@ -211,24 +212,31 @@ class Client @JvmOverloads constructor(
*
* @return this
*/
+ @Throws(IllegalArgumentException::class)
fun setEndpoint(endpoint: String): Client {
- this.endpoint = endpoint
-
- if (this.endpointRealtime == null && endpoint.startsWith("http")) {
- this.endpointRealtime = endpoint.replaceFirst("http", "ws")
+ require(endpoint.startsWith("http://") || endpoint.startsWith("https://")) {
+ "Invalid endpoint URL: $endpoint"
}
+ this.endpoint = endpoint
+ this.endpointRealtime = endpoint.replaceFirst("http", "ws")
+
return this
}
/**
- * Set realtime endpoint
- *
- * @param endpoint
- *
- * @return this
- */
+ * Set realtime endpoint
+ *
+ * @param endpoint
+ *
+ * @return this
+ */
+ @Throws(IllegalArgumentException::class)
fun setEndpointRealtime(endpoint: String): Client {
+ require(endpoint.startsWith("ws://") || endpoint.startsWith("wss://")) {
+ "Invalid realtime endpoint URL: $endpoint"
+ }
+
this.endpointRealtime = endpoint
return this
}
@@ -525,7 +533,7 @@ class Client @JvmOverloads constructor(
body
)
} else {
- AppwriteException(body, response.code)
+ AppwriteException(body, response.code, "", body)
}
it.cancel(error)
return
diff --git a/library/src/main/java/io/appwrite/enums/CreditCard.kt b/library/src/main/java/io/appwrite/enums/CreditCard.kt
index 063de61..1826304 100644
--- a/library/src/main/java/io/appwrite/enums/CreditCard.kt
+++ b/library/src/main/java/io/appwrite/enums/CreditCard.kt
@@ -34,7 +34,9 @@ enum class CreditCard(val value: String) {
@SerializedName("mir")
MIR("mir"),
@SerializedName("maestro")
- MAESTRO("maestro");
+ MAESTRO("maestro"),
+ @SerializedName("rupay")
+ RUPAY("rupay");
override fun toString() = value
}
\ No newline at end of file
diff --git a/library/src/main/java/io/appwrite/enums/OAuthProvider.kt b/library/src/main/java/io/appwrite/enums/OAuthProvider.kt
index dc1b9b3..b0cff85 100644
--- a/library/src/main/java/io/appwrite/enums/OAuthProvider.kt
+++ b/library/src/main/java/io/appwrite/enums/OAuthProvider.kt
@@ -31,6 +31,8 @@ enum class OAuthProvider(val value: String) {
ETSY("etsy"),
@SerializedName("facebook")
FACEBOOK("facebook"),
+ @SerializedName("figma")
+ FIGMA("figma"),
@SerializedName("github")
GITHUB("github"),
@SerializedName("gitlab")
diff --git a/library/src/main/java/io/appwrite/services/Account.kt b/library/src/main/java/io/appwrite/services/Account.kt
index cb22b33..13f5757 100644
--- a/library/src/main/java/io/appwrite/services/Account.kt
+++ b/library/src/main/java/io/appwrite/services/Account.kt
@@ -20,8 +20,6 @@ import java.io.File
class Account(client: Client) : Service(client) {
/**
- * Get account
- *
* Get the currently logged in user.
*
* @return [io.appwrite.models.User]
@@ -34,7 +32,6 @@ class Account(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.User = {
@Suppress("UNCHECKED_CAST")
@@ -51,8 +48,6 @@ class Account(client: Client) : Service(client) {
}
/**
- * Get account
- *
* Get the currently logged in user.
*
* @return [io.appwrite.models.User]
@@ -64,8 +59,6 @@ class Account(client: Client) : Service(client) {
)
/**
- * Create account
- *
* Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).
*
* @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.
@@ -108,8 +101,6 @@ class Account(client: Client) : Service(client) {
}
/**
- * Create account
- *
* Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).
*
* @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.
@@ -134,8 +125,6 @@ class Account(client: Client) : Service(client) {
)
/**
- * Update email
- *
* 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.
@@ -171,8 +160,6 @@ class Account(client: Client) : Service(client) {
}
/**
- * Update email
- *
* 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.
@@ -190,8 +177,6 @@ class Account(client: Client) : Service(client) {
)
/**
- * List identities
- *
* Get the list of identities for the currently logged in user.
*
* @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, provider, providerUid, providerEmail, providerAccessTokenExpiry
@@ -207,7 +192,6 @@ class Account(client: Client) : Service(client) {
"queries" to queries,
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.IdentityList = {
@Suppress("UNCHECKED_CAST")
@@ -225,8 +209,6 @@ class Account(client: Client) : Service(client) {
/**
- * Delete identity
- *
* Delete an identity by its unique ID.
*
* @param identityId Identity ID.
@@ -254,8 +236,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create JWT
- *
* Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.
*
* @return [io.appwrite.models.Jwt]
@@ -285,8 +265,6 @@ class Account(client: Client) : Service(client) {
/**
- * List logs
- *
* Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
*
* @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
@@ -302,7 +280,6 @@ class Account(client: Client) : Service(client) {
"queries" to queries,
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.LogList = {
@Suppress("UNCHECKED_CAST")
@@ -320,8 +297,6 @@ class Account(client: Client) : Service(client) {
/**
- * Update MFA
- *
* Enable or disable MFA on an account.
*
* @param mfa Enable or disable MFA.
@@ -354,8 +329,6 @@ class Account(client: Client) : Service(client) {
}
/**
- * Update MFA
- *
* Enable or disable MFA on an account.
*
* @param mfa Enable or disable MFA.
@@ -370,8 +343,6 @@ class Account(client: Client) : Service(client) {
)
/**
- * Create authenticator
- *
* 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`
@@ -404,8 +375,6 @@ class Account(client: Client) : Service(client) {
/**
- * Verify authenticator
- *
* Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.
*
* @param type Type of authenticator.
@@ -441,8 +410,6 @@ class Account(client: Client) : Service(client) {
}
/**
- * Verify authenticator
- *
* Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.
*
* @param type Type of authenticator.
@@ -460,8 +427,6 @@ class Account(client: Client) : Service(client) {
)
/**
- * Delete authenticator
- *
* Delete an authenticator for a user by ID.
*
* @param type Type of authenticator.
@@ -489,8 +454,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create MFA challenge
- *
* 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`.
@@ -523,8 +486,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create MFA challenge (confirmation)
- *
* 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.
@@ -560,8 +521,6 @@ class Account(client: Client) : Service(client) {
/**
- * List factors
- *
* List the factors available on the account to be used as a MFA challange.
*
* @return [io.appwrite.models.MfaFactors]
@@ -573,7 +532,6 @@ class Account(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.MfaFactors = {
@Suppress("UNCHECKED_CAST")
@@ -591,8 +549,6 @@ class Account(client: Client) : Service(client) {
/**
- * Get MFA recovery codes
- *
* 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]
@@ -604,7 +560,6 @@ class Account(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = {
@Suppress("UNCHECKED_CAST")
@@ -622,8 +577,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create MFA recovery codes
- *
* 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]
@@ -653,8 +606,6 @@ class Account(client: Client) : Service(client) {
/**
- * Regenerate MFA recovery codes
- *
* 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]
@@ -684,8 +635,6 @@ class Account(client: Client) : Service(client) {
/**
- * Update name
- *
* Update currently logged in user account name.
*
* @param name User name. Max length: 128 chars.
@@ -718,8 +667,6 @@ class Account(client: Client) : Service(client) {
}
/**
- * Update name
- *
* Update currently logged in user account name.
*
* @param name User name. Max length: 128 chars.
@@ -734,8 +681,6 @@ class Account(client: Client) : Service(client) {
)
/**
- * Update password
- *
* Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.
*
* @param password New user password. Must be at least 8 chars.
@@ -772,8 +717,6 @@ class Account(client: Client) : Service(client) {
}
/**
- * Update password
- *
* Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.
*
* @param password New user password. Must be at least 8 chars.
@@ -792,8 +735,6 @@ class Account(client: Client) : Service(client) {
)
/**
- * Update phone
- *
* 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.
@@ -829,8 +770,6 @@ class Account(client: Client) : Service(client) {
}
/**
- * Update phone
- *
* 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.
@@ -848,8 +787,6 @@ class Account(client: Client) : Service(client) {
)
/**
- * Get account preferences
- *
* Get the preferences as a key-value object for the currently logged in user.
*
* @return [io.appwrite.models.Preferences]
@@ -862,7 +799,6 @@ class Account(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.Preferences = {
@Suppress("UNCHECKED_CAST")
@@ -879,8 +815,6 @@ class Account(client: Client) : Service(client) {
}
/**
- * Get account preferences
- *
* Get the preferences as a key-value object for the currently logged in user.
*
* @return [io.appwrite.models.Preferences]
@@ -892,8 +826,6 @@ class Account(client: Client) : Service(client) {
)
/**
- * Update preferences
- *
* Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.
*
* @param prefs Prefs key-value JSON object.
@@ -926,8 +858,6 @@ class Account(client: Client) : Service(client) {
}
/**
- * Update preferences
- *
* Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.
*
* @param prefs Prefs key-value JSON object.
@@ -942,8 +872,6 @@ class Account(client: Client) : Service(client) {
)
/**
- * Create password recovery
- *
* 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.
@@ -979,8 +907,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create password recovery (confirmation)
- *
* 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.
@@ -1019,8 +945,6 @@ class Account(client: Client) : Service(client) {
/**
- * List sessions
- *
* Get the list of active sessions across different devices for the currently logged in user.
*
* @return [io.appwrite.models.SessionList]
@@ -1032,7 +956,6 @@ class Account(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.SessionList = {
@Suppress("UNCHECKED_CAST")
@@ -1050,8 +973,6 @@ class Account(client: Client) : Service(client) {
/**
- * Delete sessions
- *
* Delete all sessions from the user account and remove any sessions cookies from the end client.
*
* @return [Any]
@@ -1076,8 +997,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create anonymous session
- *
* Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).
*
* @return [io.appwrite.models.Session]
@@ -1107,8 +1026,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create email password session
- *
* 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.
@@ -1144,8 +1061,6 @@ class Account(client: Client) : Service(client) {
/**
- * Update magic URL session
- *
* Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
*
* @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.
@@ -1181,11 +1096,9 @@ class Account(client: Client) : Service(client) {
/**
- * Create OAuth2 session
- *
* 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, 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 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.
* @param failure URL to redirect back to your app after a failed 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.
* @param scopes A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
@@ -1255,8 +1168,6 @@ class Account(client: Client) : Service(client) {
/**
- * Update phone session
- *
* Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
*
* @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.
@@ -1292,8 +1203,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create session
- *
* Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
*
* @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.
@@ -1329,8 +1238,6 @@ class Account(client: Client) : Service(client) {
/**
- * Get session
- *
* 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.
@@ -1345,7 +1252,6 @@ class Account(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.Session = {
@Suppress("UNCHECKED_CAST")
@@ -1363,8 +1269,6 @@ class Account(client: Client) : Service(client) {
/**
- * Update session
- *
* 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.
@@ -1397,8 +1301,6 @@ class Account(client: Client) : Service(client) {
/**
- * Delete session
- *
* 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.
@@ -1426,8 +1328,6 @@ class Account(client: Client) : Service(client) {
/**
- * Update status
- *
* Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.
*
* @return [io.appwrite.models.User]
@@ -1457,8 +1357,6 @@ class Account(client: Client) : Service(client) {
}
/**
- * Update status
- *
* Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.
*
* @return [io.appwrite.models.User]
@@ -1470,8 +1368,6 @@ class Account(client: Client) : Service(client) {
)
/**
- * Create push target
- *
* Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.
*
* @param targetId Target 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.
@@ -1511,8 +1407,6 @@ class Account(client: Client) : Service(client) {
/**
- * Update push target
- *
* 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.
@@ -1548,8 +1442,6 @@ class Account(client: Client) : Service(client) {
/**
- * Delete push target
- *
* Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.
*
* @param targetId Target ID.
@@ -1577,8 +1469,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create email token (OTP)
- *
* 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.
@@ -1618,8 +1508,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create magic URL token
- *
* 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.
@@ -1662,11 +1550,9 @@ class Account(client: Client) : Service(client) {
/**
- * Create OAuth2 token
- *
* 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, 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 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.
* @param failure URL to redirect back to your app after a failed 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.
* @param scopes A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
@@ -1736,8 +1622,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create phone token
- *
* 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.
@@ -1773,8 +1657,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create email verification
- *
* 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.
@@ -1807,8 +1689,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create email verification (confirmation)
- *
* Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.
*
* @param userId User ID.
@@ -1844,8 +1724,6 @@ class Account(client: Client) : Service(client) {
/**
- * Create phone verification
- *
* 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]
@@ -1875,8 +1753,6 @@ class Account(client: Client) : Service(client) {
/**
- * Update phone verification (confirmation)
- *
* 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.
diff --git a/library/src/main/java/io/appwrite/services/Avatars.kt b/library/src/main/java/io/appwrite/services/Avatars.kt
index 9913edc..2900bf4 100644
--- a/library/src/main/java/io/appwrite/services/Avatars.kt
+++ b/library/src/main/java/io/appwrite/services/Avatars.kt
@@ -18,8 +18,6 @@ import java.io.File
class Avatars(client: Client) : Service(client) {
/**
- * Get browser icon
- *
* 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.
@@ -54,11 +52,9 @@ class Avatars(client: Client) : Service(client) {
/**
- * Get credit card icon
- *
* 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.
+ * @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.
* @param height Image height. Pass an integer between 0 to 2000. Defaults to 100.
* @param quality Image quality. Pass an integer between 0 to 100. Defaults to 100.
@@ -90,8 +86,6 @@ class Avatars(client: Client) : Service(client) {
/**
- * Get favicon
- *
* 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.
@@ -116,8 +110,6 @@ class Avatars(client: Client) : Service(client) {
/**
- * Get country flag
- *
* 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.
@@ -152,8 +144,6 @@ class Avatars(client: Client) : Service(client) {
/**
- * Get image from URL
- *
* 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.
@@ -185,8 +175,6 @@ class Avatars(client: Client) : Service(client) {
/**
- * Get user initials
- *
* 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.
@@ -221,8 +209,6 @@ class Avatars(client: Client) : Service(client) {
/**
- * Get QR code
- *
* 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.
diff --git a/library/src/main/java/io/appwrite/services/Databases.kt b/library/src/main/java/io/appwrite/services/Databases.kt
index 70ecf23..94fb69a 100644
--- a/library/src/main/java/io/appwrite/services/Databases.kt
+++ b/library/src/main/java/io/appwrite/services/Databases.kt
@@ -16,8 +16,6 @@ import java.io.File
class Databases(client: Client) : Service(client) {
/**
- * List documents
- *
* 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.
@@ -40,7 +38,6 @@ class Databases(client: Client) : Service(client) {
"queries" to queries,
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.DocumentList = {
@Suppress("UNCHECKED_CAST")
@@ -57,8 +54,6 @@ class Databases(client: Client) : Service(client) {
}
/**
- * List documents
- *
* 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.
@@ -80,8 +75,6 @@ class Databases(client: Client) : Service(client) {
)
/**
- * Create document
- *
* Create a new 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.
@@ -127,8 +120,6 @@ class Databases(client: Client) : Service(client) {
}
/**
- * Create document
- *
* Create a new 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.
@@ -156,8 +147,6 @@ class Databases(client: Client) : Service(client) {
)
/**
- * Get document
- *
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
*
* @param databaseId Database ID.
@@ -183,7 +172,6 @@ class Databases(client: Client) : Service(client) {
"queries" to queries,
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.Document = {
@Suppress("UNCHECKED_CAST")
@@ -200,8 +188,6 @@ class Databases(client: Client) : Service(client) {
}
/**
- * Get document
- *
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
*
* @param databaseId Database ID.
@@ -226,8 +212,6 @@ class Databases(client: Client) : Service(client) {
)
/**
- * Update document
- *
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
*
* @param databaseId Database ID.
@@ -273,8 +257,6 @@ class Databases(client: Client) : Service(client) {
}
/**
- * Update document
- *
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
*
* @param databaseId Database ID.
@@ -302,8 +284,6 @@ class Databases(client: Client) : Service(client) {
)
/**
- * Delete document
- *
* Delete a document by its unique ID.
*
* @param databaseId Database ID.
diff --git a/library/src/main/java/io/appwrite/services/Functions.kt b/library/src/main/java/io/appwrite/services/Functions.kt
index d31e853..473188f 100644
--- a/library/src/main/java/io/appwrite/services/Functions.kt
+++ b/library/src/main/java/io/appwrite/services/Functions.kt
@@ -16,8 +16,6 @@ import java.io.File
class Functions(client: Client) : Service(client) {
/**
- * List executions
- *
* Get a list of all the current user function execution logs. You can use the query params to filter your results.
*
* @param functionId Function ID.
@@ -39,7 +37,6 @@ class Functions(client: Client) : Service(client) {
"search" to search,
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.ExecutionList = {
@Suppress("UNCHECKED_CAST")
@@ -57,8 +54,6 @@ class Functions(client: Client) : Service(client) {
/**
- * Create execution
- *
* Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
*
* @param functionId Function ID.
@@ -110,8 +105,6 @@ class Functions(client: Client) : Service(client) {
/**
- * Get execution
- *
* Get a function execution log by its unique ID.
*
* @param functionId Function ID.
@@ -129,7 +122,6 @@ class Functions(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.Execution = {
@Suppress("UNCHECKED_CAST")
diff --git a/library/src/main/java/io/appwrite/services/Graphql.kt b/library/src/main/java/io/appwrite/services/Graphql.kt
index 6c977a2..d066c7b 100644
--- a/library/src/main/java/io/appwrite/services/Graphql.kt
+++ b/library/src/main/java/io/appwrite/services/Graphql.kt
@@ -16,8 +16,6 @@ import java.io.File
class Graphql(client: Client) : Service(client) {
/**
- * GraphQL endpoint
- *
* Execute a GraphQL mutation.
*
* @param query The query or queries to execute.
@@ -50,8 +48,6 @@ class Graphql(client: Client) : Service(client) {
/**
- * GraphQL endpoint
- *
* Execute a GraphQL mutation.
*
* @param query The query or queries to execute.
diff --git a/library/src/main/java/io/appwrite/services/Locale.kt b/library/src/main/java/io/appwrite/services/Locale.kt
index 01b3017..6257381 100644
--- a/library/src/main/java/io/appwrite/services/Locale.kt
+++ b/library/src/main/java/io/appwrite/services/Locale.kt
@@ -16,8 +16,6 @@ import java.io.File
class Locale(client: Client) : Service(client) {
/**
- * Get user locale
- *
* 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]
@@ -29,7 +27,6 @@ class Locale(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.Locale = {
@Suppress("UNCHECKED_CAST")
@@ -47,8 +44,6 @@ class Locale(client: Client) : Service(client) {
/**
- * List locale codes
- *
* List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
*
* @return [io.appwrite.models.LocaleCodeList]
@@ -60,7 +55,6 @@ class Locale(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.LocaleCodeList = {
@Suppress("UNCHECKED_CAST")
@@ -78,8 +72,6 @@ class Locale(client: Client) : Service(client) {
/**
- * List continents
- *
* List of all continents. You can use the locale header to get the data in a supported language.
*
* @return [io.appwrite.models.ContinentList]
@@ -91,7 +83,6 @@ class Locale(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.ContinentList = {
@Suppress("UNCHECKED_CAST")
@@ -109,8 +100,6 @@ class Locale(client: Client) : Service(client) {
/**
- * List countries
- *
* List of all countries. You can use the locale header to get the data in a supported language.
*
* @return [io.appwrite.models.CountryList]
@@ -122,7 +111,6 @@ class Locale(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.CountryList = {
@Suppress("UNCHECKED_CAST")
@@ -140,8 +128,6 @@ class Locale(client: Client) : Service(client) {
/**
- * List EU countries
- *
* List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.
*
* @return [io.appwrite.models.CountryList]
@@ -153,7 +139,6 @@ class Locale(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.CountryList = {
@Suppress("UNCHECKED_CAST")
@@ -171,8 +156,6 @@ class Locale(client: Client) : Service(client) {
/**
- * List countries phone codes
- *
* List of all countries phone codes. You can use the locale header to get the data in a supported language.
*
* @return [io.appwrite.models.PhoneList]
@@ -184,7 +167,6 @@ class Locale(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.PhoneList = {
@Suppress("UNCHECKED_CAST")
@@ -202,8 +184,6 @@ class Locale(client: Client) : Service(client) {
/**
- * List currencies
- *
* List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
*
* @return [io.appwrite.models.CurrencyList]
@@ -215,7 +195,6 @@ class Locale(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.CurrencyList = {
@Suppress("UNCHECKED_CAST")
@@ -233,8 +212,6 @@ class Locale(client: Client) : Service(client) {
/**
- * List languages
- *
* List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
*
* @return [io.appwrite.models.LanguageList]
@@ -246,7 +223,6 @@ class Locale(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.LanguageList = {
@Suppress("UNCHECKED_CAST")
diff --git a/library/src/main/java/io/appwrite/services/Messaging.kt b/library/src/main/java/io/appwrite/services/Messaging.kt
index baca2c4..d0679bb 100644
--- a/library/src/main/java/io/appwrite/services/Messaging.kt
+++ b/library/src/main/java/io/appwrite/services/Messaging.kt
@@ -16,8 +16,6 @@ import java.io.File
class Messaging(client: Client) : Service(client) {
/**
- * Create subscriber
- *
* Create a new subscriber.
*
* @param topicId Topic ID. The topic ID to subscribe to.
@@ -56,8 +54,6 @@ class Messaging(client: Client) : Service(client) {
/**
- * Delete subscriber
- *
* Delete a subscriber by its unique ID.
*
* @param topicId Topic ID. The topic ID subscribed to.
diff --git a/library/src/main/java/io/appwrite/services/Storage.kt b/library/src/main/java/io/appwrite/services/Storage.kt
index 1f990c2..0facb1d 100644
--- a/library/src/main/java/io/appwrite/services/Storage.kt
+++ b/library/src/main/java/io/appwrite/services/Storage.kt
@@ -18,8 +18,6 @@ import java.io.File
class Storage(client: Client) : Service(client) {
/**
- * List files
- *
* Get a list of all the user files. You can use the query params to filter your results.
*
* @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).
@@ -41,7 +39,6 @@ class Storage(client: Client) : Service(client) {
"search" to search,
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.FileList = {
@Suppress("UNCHECKED_CAST")
@@ -59,8 +56,6 @@ class Storage(client: Client) : Service(client) {
/**
- * Create file
- *
* 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).
@@ -108,8 +103,6 @@ class Storage(client: Client) : Service(client) {
/**
- * Get file
- *
* Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.
*
* @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).
@@ -127,7 +120,6 @@ class Storage(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.File = {
@Suppress("UNCHECKED_CAST")
@@ -145,8 +137,6 @@ class Storage(client: Client) : Service(client) {
/**
- * Update file
- *
* Update a file by its unique ID. Only users with write permissions have access to update this resource.
*
* @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).
@@ -189,8 +179,6 @@ class Storage(client: Client) : Service(client) {
/**
- * Delete file
- *
* Delete a file by its unique ID. Only users with write permissions have access to delete this resource.
*
* @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).
@@ -221,8 +209,6 @@ class Storage(client: Client) : Service(client) {
/**
- * Get file for download
- *
* 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).
@@ -250,8 +236,6 @@ class Storage(client: Client) : Service(client) {
/**
- * Get file preview
- *
* Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.
*
* @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).
@@ -313,8 +297,6 @@ class Storage(client: Client) : Service(client) {
/**
- * Get file for view
- *
* 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).
diff --git a/library/src/main/java/io/appwrite/services/Teams.kt b/library/src/main/java/io/appwrite/services/Teams.kt
index b586f11..7e35403 100644
--- a/library/src/main/java/io/appwrite/services/Teams.kt
+++ b/library/src/main/java/io/appwrite/services/Teams.kt
@@ -16,8 +16,6 @@ import java.io.File
class Teams(client: Client) : Service(client) {
/**
- * List teams
- *
* Get a list of all the teams in which the current user is a member. You can use the parameters 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, total, billingPlan
@@ -37,7 +35,6 @@ class Teams(client: Client) : Service(client) {
"search" to search,
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.TeamList = {
@Suppress("UNCHECKED_CAST")
@@ -54,8 +51,6 @@ class Teams(client: Client) : Service(client) {
}
/**
- * List teams
- *
* Get a list of all the teams in which the current user is a member. You can use the parameters 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, total, billingPlan
@@ -74,8 +69,6 @@ class Teams(client: Client) : Service(client) {
)
/**
- * Create team
- *
* Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.
*
* @param teamId Team 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.
@@ -115,8 +108,6 @@ class Teams(client: Client) : Service(client) {
}
/**
- * Create team
- *
* Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.
*
* @param teamId Team 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.
@@ -138,8 +129,6 @@ class Teams(client: Client) : Service(client) {
)
/**
- * Get team
- *
* Get a team by its ID. All team members have read access for this resource.
*
* @param teamId Team ID.
@@ -155,7 +144,6 @@ class Teams(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.Team = {
@Suppress("UNCHECKED_CAST")
@@ -172,8 +160,6 @@ class Teams(client: Client) : Service(client) {
}
/**
- * Get team
- *
* Get a team by its ID. All team members have read access for this resource.
*
* @param teamId Team ID.
@@ -188,8 +174,6 @@ class Teams(client: Client) : Service(client) {
)
/**
- * Update name
- *
* Update the team's name by its unique ID.
*
* @param teamId Team ID.
@@ -225,8 +209,6 @@ class Teams(client: Client) : Service(client) {
}
/**
- * Update name
- *
* Update the team's name by its unique ID.
*
* @param teamId Team ID.
@@ -244,8 +226,6 @@ class Teams(client: Client) : Service(client) {
)
/**
- * Delete team
- *
* Delete a team using its ID. Only team members with the owner role can delete the team.
*
* @param teamId Team ID.
@@ -273,8 +253,6 @@ class Teams(client: Client) : Service(client) {
/**
- * List team memberships
- *
* 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.
@@ -296,7 +274,6 @@ class Teams(client: Client) : Service(client) {
"search" to search,
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.MembershipList = {
@Suppress("UNCHECKED_CAST")
@@ -314,8 +291,6 @@ class Teams(client: Client) : Service(client) {
/**
- * Create team membership
- *
* 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.
@@ -367,8 +342,6 @@ class Teams(client: Client) : Service(client) {
/**
- * Get team membership
- *
* Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.
*
* @param teamId Team ID.
@@ -386,7 +359,6 @@ class Teams(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.Membership = {
@Suppress("UNCHECKED_CAST")
@@ -404,8 +376,6 @@ class Teams(client: Client) : Service(client) {
/**
- * Update membership
- *
* 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.
@@ -444,8 +414,6 @@ class Teams(client: Client) : Service(client) {
/**
- * Delete team membership
- *
* This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.
*
* @param teamId Team ID.
@@ -476,8 +444,6 @@ class Teams(client: Client) : Service(client) {
/**
- * Update team membership status
- *
* 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.
@@ -519,8 +485,6 @@ class Teams(client: Client) : Service(client) {
/**
- * Get team preferences
- *
* 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.
@@ -536,7 +500,6 @@ class Teams(client: Client) : Service(client) {
val apiParams = mutableMapOf(
)
val apiHeaders = mutableMapOf(
- "content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.Preferences = {
@Suppress("UNCHECKED_CAST")
@@ -553,8 +516,6 @@ class Teams(client: Client) : Service(client) {
}
/**
- * Get team preferences
- *
* 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.
@@ -569,8 +530,6 @@ class Teams(client: Client) : Service(client) {
)
/**
- * Update preferences
- *
* 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.
@@ -606,8 +565,6 @@ class Teams(client: Client) : Service(client) {
}
/**
- * Update preferences
- *
* 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.