From a769fb1fbbf421ec12f1a2efeae53a7a1a89c541 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 23 Aug 2025 22:14:55 +1200 Subject: [PATCH] Add 1.8.x support --- .../main/java/io/appwrite/models/Execution.kt | 4 +- .../main/java/io/appwrite/models/Locale.kt | 2 +- .../main/java/io/appwrite/services/Account.kt | 100 +++++++++--------- .../main/java/io/appwrite/services/Avatars.kt | 42 ++++---- .../java/io/appwrite/services/Databases.kt | 4 +- .../java/io/appwrite/services/Functions.kt | 2 +- .../main/java/io/appwrite/services/Graphql.kt | 2 +- .../main/java/io/appwrite/services/Locale.kt | 6 +- .../java/io/appwrite/services/Messaging.kt | 2 +- .../main/java/io/appwrite/services/Storage.kt | 16 +-- .../java/io/appwrite/services/TablesDb.kt | 4 +- .../main/java/io/appwrite/services/Teams.kt | 30 +++--- 12 files changed, 108 insertions(+), 106 deletions(-) diff --git a/library/src/main/java/io/appwrite/models/Execution.kt b/library/src/main/java/io/appwrite/models/Execution.kt index c1525bc..8b395c6 100644 --- a/library/src/main/java/io/appwrite/models/Execution.kt +++ b/library/src/main/java/io/appwrite/models/Execution.kt @@ -20,7 +20,7 @@ data class Execution( val createdAt: String, /** - * Execution upate date in ISO 8601 format. + * Execution update date in ISO 8601 format. */ @SerializedName("\$updatedAt") val updatedAt: String, @@ -38,7 +38,7 @@ data class Execution( val functionId: String, /** - * Function's deployment ID used to create the execution. + * Function's deployment ID used to create the execution. */ @SerializedName("deploymentId") val deploymentId: String, diff --git a/library/src/main/java/io/appwrite/models/Locale.kt b/library/src/main/java/io/appwrite/models/Locale.kt index abe4a0e..93d28d4 100644 --- a/library/src/main/java/io/appwrite/models/Locale.kt +++ b/library/src/main/java/io/appwrite/models/Locale.kt @@ -26,7 +26,7 @@ data class Locale( val country: String, /** - * Continent code. A two character continent code "AF" for Africa, "AN" for Antarctica, "AS" for Asia, "EU" for Europe, "NA" for North America, "OC" for Oceania, and "SA" for South America. + * Continent code. A two character continent code "AF" for Africa, "AN" for Antarctica, "AS" for Asia, "EU" for Europe, "NA" for North America, "OC" for Oceania, and "SA" for South America. */ @SerializedName("continentCode") val continentCode: String, diff --git a/library/src/main/java/io/appwrite/services/Account.kt b/library/src/main/java/io/appwrite/services/Account.kt index 0af63c7..1c3509d 100644 --- a/library/src/main/java/io/appwrite/services/Account.kt +++ b/library/src/main/java/io/appwrite/services/Account.kt @@ -16,7 +16,7 @@ import java.io.File /** * The Account service allows you to authenticate and manage a user account. -**/ + */ class Account(client: Client) : Service(client) { /** @@ -126,8 +126,8 @@ class Account(client: Client) : Service(client) { /** * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request. - * This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. - * + * This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. + * * * @param email User email. * @param password User password. Must be at least 8 chars. @@ -162,7 +162,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. @@ -351,8 +353,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.MfaType] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `CreateMFAAuthenticator` instead.", - replaceWith = ReplaceWith("io.appwrite.services.CreateMFAAuthenticator"), + message = "This API has been deprecated since 1.8.0. Please use `Account.createMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.createMFAAuthenticator"), since = "1.8.0" ) suspend fun createMfaAuthenticator( @@ -421,8 +423,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.User] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateMFAAuthenticator` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateMFAAuthenticator"), + message = "This API has been deprecated since 1.8.0. Please use `Account.updateMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.updateMFAAuthenticator"), since = "1.8.0" ) suspend fun updateMfaAuthenticator( @@ -461,8 +463,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.User] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateMFAAuthenticator` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateMFAAuthenticator"), + message = "This API has been deprecated since 1.8.0. Please use `Account.updateMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.updateMFAAuthenticator"), since = "1.8.0" ) @Throws(AppwriteException::class) @@ -534,8 +536,8 @@ class Account(client: Client) : Service(client) { * @return [Any] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `DeleteMFAAuthenticator` instead.", - replaceWith = ReplaceWith("io.appwrite.services.DeleteMFAAuthenticator"), + message = "This API has been deprecated since 1.8.0. Please use `Account.deleteMFAAuthenticator` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.deleteMFAAuthenticator"), since = "1.8.0" ) suspend fun deleteMfaAuthenticator( @@ -593,8 +595,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.MfaChallenge] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `CreateMFAChallenge` instead.", - replaceWith = ReplaceWith("io.appwrite.services.CreateMFAChallenge"), + message = "This API has been deprecated since 1.8.0. Please use `Account.createMFAChallenge` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.createMFAChallenge"), since = "1.8.0" ) suspend fun createMfaChallenge( @@ -663,8 +665,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.Session] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateMFAChallenge` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateMFAChallenge"), + message = "This API has been deprecated since 1.8.0. Please use `Account.updateMFAChallenge` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.updateMFAChallenge"), since = "1.8.0" ) suspend fun updateMfaChallenge( @@ -736,8 +738,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.MfaFactors] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `ListMFAFactors` instead.", - replaceWith = ReplaceWith("io.appwrite.services.ListMFAFactors"), + message = "This API has been deprecated since 1.8.0. Please use `Account.listMFAFactors` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.listMFAFactors"), since = "1.8.0" ) suspend fun listMfaFactors( @@ -797,8 +799,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.MfaRecoveryCodes] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `GetMFARecoveryCodes` instead.", - replaceWith = ReplaceWith("io.appwrite.services.GetMFARecoveryCodes"), + message = "This API has been deprecated since 1.8.0. Please use `Account.getMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.getMFARecoveryCodes"), since = "1.8.0" ) suspend fun getMfaRecoveryCodes( @@ -858,8 +860,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.MfaRecoveryCodes] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `CreateMFARecoveryCodes` instead.", - replaceWith = ReplaceWith("io.appwrite.services.CreateMFARecoveryCodes"), + message = "This API has been deprecated since 1.8.0. Please use `Account.createMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.createMFARecoveryCodes"), since = "1.8.0" ) suspend fun createMfaRecoveryCodes( @@ -921,8 +923,8 @@ class Account(client: Client) : Service(client) { * @return [io.appwrite.models.MfaRecoveryCodes] */ @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `UpdateMFARecoveryCodes` instead.", - replaceWith = ReplaceWith("io.appwrite.services.UpdateMFARecoveryCodes"), + message = "This API has been deprecated since 1.8.0. Please use `Account.updateMFARecoveryCodes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Account.updateMFARecoveryCodes"), since = "1.8.0" ) suspend fun updateMfaRecoveryCodes( @@ -1114,7 +1116,7 @@ class Account(client: Client) : Service(client) { } /** - * Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS. + * Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS. * * @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. * @param password User password. Must be at least 8 chars. @@ -1252,8 +1254,8 @@ class Account(client: Client) : Service(client) { /** * Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint. - * - * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. + * + * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * * @param userId User ID. * @param secret Valid reset token. @@ -1373,8 +1375,8 @@ class Account(client: Client) : Service(client) { /** * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. - * - * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param email User email. * @param password User password. Must be at least 8 chars. @@ -1448,11 +1450,11 @@ class Account(client: Client) : Service(client) { /** * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. - * - * If 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). - * + * + * 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. @@ -1829,9 +1831,9 @@ class Account(client: Client) : Service(client) { /** * Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. - * - * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). - * + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored. * @param email User email. @@ -1871,9 +1873,9 @@ class Account(client: Client) : Service(client) { /** * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. - * - * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). - * + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * * * @param userId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored. * @param email User email. @@ -1916,10 +1918,10 @@ class Account(client: Client) : Service(client) { /** * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. - * - * If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. - * - * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * + * If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom. * @param success URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. @@ -1992,8 +1994,8 @@ class Account(client: Client) : Service(client) { /** * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. - * - * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param userId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored. * @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. @@ -2029,9 +2031,9 @@ class Account(client: Client) : Service(client) { /** * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. - * - * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. - * + * + * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. + * * * @param url URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @return [io.appwrite.models.Token] diff --git a/library/src/main/java/io/appwrite/services/Avatars.kt b/library/src/main/java/io/appwrite/services/Avatars.kt index 4741d10..ed7e7fa 100644 --- a/library/src/main/java/io/appwrite/services/Avatars.kt +++ b/library/src/main/java/io/appwrite/services/Avatars.kt @@ -14,13 +14,13 @@ import java.io.File /** * The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars. -**/ + */ class Avatars(client: Client) : Service(client) { /** * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings. - * - * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. * * @param code Browser Code. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -55,9 +55,9 @@ class Avatars(client: Client) : Service(client) { /** * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. - * - * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. - * + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * * * @param code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -92,8 +92,8 @@ class Avatars(client: Client) : Service(client) { /** * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL. - * - * This endpoint does not follow HTTP redirects. + * + * This endpoint does not follow HTTP redirects. * * @param url Website URL which you want to fetch the favicon from. * @return [ByteArray] @@ -118,9 +118,9 @@ class Avatars(client: Client) : Service(client) { /** * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard. - * - * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. - * + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * * * @param code Country Code. ISO Alpha-2 country code format. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -155,10 +155,10 @@ class Avatars(client: Client) : Service(client) { /** * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. - * - * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px. - * - * This endpoint does not follow HTTP redirects. + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px. + * + * This endpoint does not follow HTTP redirects. * * @param url Image URL which you want to crop. * @param width Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400. @@ -190,11 +190,11 @@ class Avatars(client: Client) : Service(client) { /** * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned. - * - * You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. - * - * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. - * + * + * You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. + * + * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * * * @param name Full Name. When empty, current user name or email will be used. Max length: 128 chars. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -229,7 +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. diff --git a/library/src/main/java/io/appwrite/services/Databases.kt b/library/src/main/java/io/appwrite/services/Databases.kt index 059ce2b..c8a7c92 100644 --- a/library/src/main/java/io/appwrite/services/Databases.kt +++ b/library/src/main/java/io/appwrite/services/Databases.kt @@ -12,7 +12,7 @@ import java.io.File /** * The Databases service allows you to create structured collections of documents, query and filter lists of documents -**/ + */ class Databases(client: Client) : Service(client) { /** @@ -59,7 +59,7 @@ class Databases(client: Client) : Service(client) { } /** - * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. + * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). diff --git a/library/src/main/java/io/appwrite/services/Functions.kt b/library/src/main/java/io/appwrite/services/Functions.kt index b370448..b938581 100644 --- a/library/src/main/java/io/appwrite/services/Functions.kt +++ b/library/src/main/java/io/appwrite/services/Functions.kt @@ -12,7 +12,7 @@ import java.io.File /** * The Functions Service allows you view, create and manage your Cloud Functions. -**/ + */ class Functions(client: Client) : Service(client) { /** diff --git a/library/src/main/java/io/appwrite/services/Graphql.kt b/library/src/main/java/io/appwrite/services/Graphql.kt index fbb4f7d..895b9d6 100644 --- a/library/src/main/java/io/appwrite/services/Graphql.kt +++ b/library/src/main/java/io/appwrite/services/Graphql.kt @@ -12,7 +12,7 @@ import java.io.File /** * The GraphQL API allows you to query and mutate your Appwrite server using GraphQL. -**/ + */ class Graphql(client: Client) : Service(client) { /** diff --git a/library/src/main/java/io/appwrite/services/Locale.kt b/library/src/main/java/io/appwrite/services/Locale.kt index bc48d1b..aecc83a 100644 --- a/library/src/main/java/io/appwrite/services/Locale.kt +++ b/library/src/main/java/io/appwrite/services/Locale.kt @@ -12,13 +12,13 @@ import java.io.File /** * 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)) + * + * ([IP Geolocation by DB-IP](https://db-ip.com)) * * @return [io.appwrite.models.Locale] */ diff --git a/library/src/main/java/io/appwrite/services/Messaging.kt b/library/src/main/java/io/appwrite/services/Messaging.kt index 8efd1a4..148618e 100644 --- a/library/src/main/java/io/appwrite/services/Messaging.kt +++ b/library/src/main/java/io/appwrite/services/Messaging.kt @@ -12,7 +12,7 @@ import java.io.File /** * The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.). -**/ + */ class Messaging(client: Client) : Service(client) { /** diff --git a/library/src/main/java/io/appwrite/services/Storage.kt b/library/src/main/java/io/appwrite/services/Storage.kt index df24488..daa79a4 100644 --- a/library/src/main/java/io/appwrite/services/Storage.kt +++ b/library/src/main/java/io/appwrite/services/Storage.kt @@ -14,7 +14,7 @@ import java.io.File /** * The Storage service allows you to manage your project files. -**/ + */ class Storage(client: Client) : Service(client) { /** @@ -57,13 +57,13 @@ class Storage(client: Client) : Service(client) { /** * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console. - * - * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes. - * - * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one. - * - * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. - * + * + * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes. + * + * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one. + * + * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. + * * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @param fileId File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. diff --git a/library/src/main/java/io/appwrite/services/TablesDb.kt b/library/src/main/java/io/appwrite/services/TablesDb.kt index 73e0342..2cc40e3 100644 --- a/library/src/main/java/io/appwrite/services/TablesDb.kt +++ b/library/src/main/java/io/appwrite/services/TablesDb.kt @@ -12,7 +12,7 @@ import java.io.File /** * -**/ + */ class TablesDB(client: Client) : Service(client) { /** @@ -54,7 +54,7 @@ class TablesDB(client: Client) : Service(client) { } /** - * Get a list of all the user's rows in a given table. You can use the query params to filter your results. + * Get a list of all the user's rows in a given table. You can use the query params to filter your results. * * @param databaseId Database ID. * @param tableId Table ID. You can create a new table using the TableDB service [server integration](https://appwrite.io/docs/server/tablesdbdb#tablesdbCreate). diff --git a/library/src/main/java/io/appwrite/services/Teams.kt b/library/src/main/java/io/appwrite/services/Teams.kt index 0ca03cb..54dcc3b 100644 --- a/library/src/main/java/io/appwrite/services/Teams.kt +++ b/library/src/main/java/io/appwrite/services/Teams.kt @@ -12,7 +12,7 @@ import java.io.File /** * The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources -**/ + */ class Teams(client: Client) : Service(client) { /** @@ -209,7 +209,7 @@ class Teams(client: Client) : Service(client) { } /** - * Update the team's name by its unique ID. + * Update the team's name by its unique ID. * * @param teamId Team ID. * @param name New team name. Max length: 128 chars. @@ -292,13 +292,13 @@ class Teams(client: Client) : Service(client) { /** * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. - * - * You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. - * - * Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. - * - * Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. - * + * + * You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. + * + * Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. + * + * Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. + * * * @param teamId Team ID. * @param roles Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long. @@ -384,7 +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. @@ -453,9 +453,9 @@ class Teams(client: Client) : Service(client) { /** * Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user. - * - * If the request is successful, a session for the user is automatically created. - * + * + * If the request is successful, a session for the user is automatically created. + * * * @param teamId Team ID. * @param membershipId Membership ID. @@ -527,7 +527,7 @@ class Teams(client: Client) : Service(client) { } /** - * Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). + * Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). * * @param teamId Team ID. * @return [io.appwrite.models.Preferences] @@ -576,7 +576,7 @@ class Teams(client: Client) : Service(client) { } /** - * Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. + * Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. * * @param teamId Team ID. * @param prefs Prefs key-value JSON object.