From a9c3550195463cd1be0999563c18746c80dfec71 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 16 Nov 2023 16:54:56 +1300 Subject: [PATCH 1/2] Fix between query output --- README.md | 6 +- library/src/main/java/io/appwrite/Client.kt | 2 +- library/src/main/java/io/appwrite/Query.kt | 6 +- .../main/java/io/appwrite/enums/Browser.kt | 20 ++ .../main/java/io/appwrite/enums/CreditCard.kt | 22 ++ .../src/main/java/io/appwrite/enums/Flag.kt | 200 ++++++++++++++++++ .../java/io/appwrite/enums/ImageFormat.kt | 11 + .../java/io/appwrite/enums/ImageGravity.kt | 15 ++ .../src/main/java/io/appwrite/enums/Method.kt | 12 ++ .../main/java/io/appwrite/enums/Provider.kt | 44 ++++ .../main/java/io/appwrite/models/Document.kt | 2 +- .../src/main/java/io/appwrite/models/File.kt | 2 +- .../main/java/io/appwrite/services/Account.kt | 106 +++++----- .../main/java/io/appwrite/services/Avatars.kt | 18 +- .../java/io/appwrite/services/Databases.kt | 30 +-- .../java/io/appwrite/services/Functions.kt | 6 +- .../main/java/io/appwrite/services/Graphql.kt | 4 +- .../main/java/io/appwrite/services/Locale.kt | 14 +- .../main/java/io/appwrite/services/Storage.kt | 38 ++-- .../main/java/io/appwrite/services/Teams.kt | 52 ++--- 20 files changed, 467 insertions(+), 143 deletions(-) create mode 100644 library/src/main/java/io/appwrite/enums/Browser.kt create mode 100644 library/src/main/java/io/appwrite/enums/CreditCard.kt create mode 100644 library/src/main/java/io/appwrite/enums/Flag.kt create mode 100644 library/src/main/java/io/appwrite/enums/ImageFormat.kt create mode 100644 library/src/main/java/io/appwrite/enums/ImageGravity.kt create mode 100644 library/src/main/java/io/appwrite/enums/Method.kt create mode 100644 library/src/main/java/io/appwrite/enums/Provider.kt diff --git a/README.md b/README.md index 16c3d84..e5d5922 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-android.svg?color=green&style=flat-square) ![License](https://img.shields.io/github/license/appwrite/sdk-for-android.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.4.2-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.4.12-blue.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) @@ -38,7 +38,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-android:4.0.0") +implementation("io.appwrite:sdk-for-android:4.0.1") ``` ### Maven @@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file: io.appwrite sdk-for-android - 4.0.0 + 4.0.1 ``` diff --git a/library/src/main/java/io/appwrite/Client.kt b/library/src/main/java/io/appwrite/Client.kt index c6235ef..94f82b6 100644 --- a/library/src/main/java/io/appwrite/Client.kt +++ b/library/src/main/java/io/appwrite/Client.kt @@ -88,7 +88,7 @@ class Client @JvmOverloads constructor( "x-sdk-name" to "Android", "x-sdk-platform" to "client", "x-sdk-language" to "android", - "x-sdk-version" to "4.0.0", + "x-sdk-version" to "4.0.1", "x-appwrite-response-format" to "1.4.0" ) config = mutableMapOf() diff --git a/library/src/main/java/io/appwrite/Query.kt b/library/src/main/java/io/appwrite/Query.kt index ad1f3ed..7957865 100644 --- a/library/src/main/java/io/appwrite/Query.kt +++ b/library/src/main/java/io/appwrite/Query.kt @@ -20,11 +20,11 @@ class Query { fun isNotNull(attribute: String) = "isNotNull(\"${attribute}\")" - fun between(attribute: String, start: Int, end: Int) = Query.addQuery(attribute, "between", listOf(start, end)) + fun between(attribute: String, start: Int, end: Int) = "between(\"${attribute}\", ${start}, ${end})" - fun between(attribute: String, start: Double, end: Double) = Query.addQuery(attribute, "between", listOf(start, end)) + fun between(attribute: String, start: Double, end: Double) = "between(\"${attribute}\", ${start}, ${end})" - fun between(attribute: String, start: String, end: String) = Query.addQuery(attribute, "between", listOf(start, end)) + fun between(attribute: String, start: String, end: String) = "between(\"${attribute}\", \"${start}\", \"${end}\")" fun startsWith(attribute: String, value: String) = Query.addQuery(attribute, "startsWith", value) diff --git a/library/src/main/java/io/appwrite/enums/Browser.kt b/library/src/main/java/io/appwrite/enums/Browser.kt new file mode 100644 index 0000000..99f598e --- /dev/null +++ b/library/src/main/java/io/appwrite/enums/Browser.kt @@ -0,0 +1,20 @@ +package io.appwrite.enums + +enum class Browser(val value: String) { + AVANT_BROWSER("aa"), + ANDROID_WEB_VIEW_BETA("an"), + GOOGLE_CHROME("ch"), + GOOGLE_CHROMEI_OS("ci"), + GOOGLE_CHROME_MOBILE("cm"), + CHROMIUM("cr"), + MOZILLA_FIREFOX("ff"), + SAFARI("sf"), + MOBILE_SAFARI("mf"), + MICROSOFT_EDGE("ps"), + MICROSOFT_EDGEI_OS("oi"), + OPERA_MINI("om"), + OPERA("op"), + OPERA_NEXT("on"); + + override fun toString() = value +} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/enums/CreditCard.kt b/library/src/main/java/io/appwrite/enums/CreditCard.kt new file mode 100644 index 0000000..e99519b --- /dev/null +++ b/library/src/main/java/io/appwrite/enums/CreditCard.kt @@ -0,0 +1,22 @@ +package io.appwrite.enums + +enum class CreditCard(val value: String) { + AMERICAN_EXPRESS("amex"), + ARGENCARD("argencard"), + CABAL("cabal"), + CONSOSUD("censosud"), + DINERS_CLUB("diners"), + DISCOVER("discover"), + ELO("elo"), + HIPERCARD("hipercard"), + JCB("jcb"), + MASTERCARD("mastercard"), + NARANJA("naranja"), + TARJETA_SHOPPING("targeta-shopping"), + UNION_CHINA_PAY("union-china-pay"), + VISA("visa"), + MIR("mir"), + MAESTRO("maestro"); + + override fun toString() = value +} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/enums/Flag.kt b/library/src/main/java/io/appwrite/enums/Flag.kt new file mode 100644 index 0000000..4fcdd88 --- /dev/null +++ b/library/src/main/java/io/appwrite/enums/Flag.kt @@ -0,0 +1,200 @@ +package io.appwrite.enums + +enum class Flag(val value: String) { + AFGHANISTAN("af"), + ANGOLA("ao"), + ALBANIA("al"), + ANDORRA("ad"), + UNITED_ARAB_EMIRATES("ae"), + ARGENTINA("ar"), + ARMENIA("am"), + ANTIGUAAND_BARBUDA("ag"), + AUSTRALIA("au"), + AUSTRIA("at"), + AZERBAIJAN("az"), + BURUNDI("bi"), + BELGIUM("be"), + BENIN("bj"), + BURKINA_FASO("bf"), + BANGLADESH("bd"), + BULGARIA("bg"), + BAHRAIN("bh"), + BAHAMAS("bs"), + BOSNIAAND_HERZEGOVINA("ba"), + BELARUS("by"), + BELIZE("bz"), + BOLIVIA("bo"), + BRAZIL("br"), + BARBADOS("bb"), + BRUNEI_DARUSSALAM("bn"), + BHUTAN("bt"), + BOTSWANA("bw"), + CENTRAL_AFRICAN_REPUBLIC("cf"), + CANADA("ca"), + SWITZERLAND("ch"), + CHILE("cl"), + CHINA("cn"), + CTED_IVOIRE("ci"), + CAMEROON("cm"), + DEMOCRATIC_REPUBLICOFTHE_CONGO("cd"), + REPUBLICOFTHE_CONGO("cg"), + COLOMBIA("co"), + COMOROS("km"), + CAPE_VERDE("cv"), + COSTA_RICA("cr"), + CUBA("cu"), + CYPRUS("cy"), + CZECH_REPUBLIC("cz"), + GERMANY("de"), + DJIBOUTI("dj"), + DOMINICA("dm"), + DENMARK("dk"), + DOMINICAN_REPUBLIC("do"), + ALGERIA("dz"), + ECUADOR("ec"), + EGYPT("eg"), + ERITREA("er"), + SPAIN("es"), + ESTONIA("ee"), + ETHIOPIA("et"), + FINLAND("fi"), + FIJI("fj"), + FRANCE("fr"), + MICRONESIA_FEDERATED_STATESOF("fm"), + GABON("ga"), + UNITED_KINGDOM("gb"), + GEORGIA("ge"), + GHANA("gh"), + GUINEA("gn"), + GAMBIA("gm"), + GUINEA_BISSAU("gw"), + EQUATORIAL_GUINEA("gq"), + GREECE("gr"), + GRENADA("gd"), + GUATEMALA("gt"), + GUYANA("gy"), + HONDURAS("hn"), + CROATIA("hr"), + HAITI("ht"), + HUNGARY("hu"), + INDONESIA("id"), + INDIA("in"), + IRELAND("ie"), + IRAN_ISLAMIC_REPUBLICOF("ir"), + IRAQ("iq"), + ICELAND("is"), + ISRAEL("il"), + ITALY("it"), + JAMAICA("jm"), + JORDAN("jo"), + JAPAN("jp"), + KAZAKHSTAN("kz"), + KENYA("ke"), + KYRGYZSTAN("kg"), + CAMBODIA("kh"), + KIRIBATI("ki"), + SAINT_KITTSAND_NEVIS("kn"), + SOUTH_KOREA("kr"), + KUWAIT("kw"), + LAO_PEOPLES_DEMOCRATIC_REPUBLIC("la"), + LEBANON("lb"), + LIBERIA("lr"), + LIBYA("ly"), + SAINT_LUCIA("lc"), + LIECHTENSTEIN("li"), + SRI_LANKA("lk"), + LESOTHO("ls"), + LITHUANIA("lt"), + LUXEMBOURG("lu"), + LATVIA("lv"), + MOROCCO("ma"), + MONACO("mc"), + MOLDOVA("md"), + MADAGASCAR("mg"), + MALDIVES("mv"), + MEXICO("mx"), + MARSHALL_ISLANDS("mh"), + NORTH_MACEDONIA("mk"), + MALI("ml"), + MALTA("mt"), + MYANMAR("mm"), + MONTENEGRO("me"), + MONGOLIA("mn"), + MOZAMBIQUE("mz"), + MAURITANIA("mr"), + MAURITIUS("mu"), + MALAWI("mw"), + MALAYSIA("my"), + NAMIBIA("na"), + NIGER("ne"), + NIGERIA("ng"), + NICARAGUA("ni"), + NETHERLANDS("nl"), + NORWAY("no"), + NEPAL("np"), + NAURU("nr"), + NEW_ZEALAND("nz"), + OMAN("om"), + PAKISTAN("pk"), + PANAMA("pa"), + PERU("pe"), + PHILIPPINES("ph"), + PALAU("pw"), + PAPUA_NEW_GUINEA("pg"), + POLAND("pl"), + NORTH_KOREA("kp"), + PORTUGAL("pt"), + PARAGUAY("py"), + QATAR("qa"), + ROMANIA("ro"), + RUSSIA("ru"), + RWANDA("rw"), + SAUDI_ARABIA("sa"), + SUDAN("sd"), + SENEGAL("sn"), + SINGAPORE("sg"), + SOLOMON_ISLANDS("sb"), + SIERRA_LEONE("sl"), + EL_SALVADOR("sv"), + SAN_MARINO("sm"), + SOMALIA("so"), + SERBIA("rs"), + SOUTH_SUDAN("ss"), + SAO_TOMEAND_PRINCIPE("st"), + SURINAME("sr"), + SLOVAKIA("sk"), + SLOVENIA("si"), + SWEDEN("se"), + ESWATINI("sz"), + SEYCHELLES("sc"), + SYRIA("sy"), + CHAD("td"), + TOGO("tg"), + THAILAND("th"), + TAJIKISTAN("tj"), + TURKMENISTAN("tm"), + TIMOR_LESTE("tl"), + TONGA("to"), + TRINIDADAND_TOBAGO("tt"), + TUNISIA("tn"), + TURKEY("tr"), + TUVALU("tv"), + TANZANIA("tz"), + UGANDA("ug"), + UKRAINE("ua"), + URUGUAY("uy"), + UNITED_STATES("us"), + UZBEKISTAN("uz"), + VATICAN_CITY("va"), + SAINT_VINCENTANDTHE_GRENADINES("vc"), + VENEZUELA("ve"), + VIETNAM("vn"), + VANUATU("vu"), + SAMOA("ws"), + YEMEN("ye"), + SOUTH_AFRICA("za"), + ZAMBIA("zm"), + ZIMBABWE("zw"); + + override fun toString() = value +} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/enums/ImageFormat.kt b/library/src/main/java/io/appwrite/enums/ImageFormat.kt new file mode 100644 index 0000000..6a4c422 --- /dev/null +++ b/library/src/main/java/io/appwrite/enums/ImageFormat.kt @@ -0,0 +1,11 @@ +package io.appwrite.enums + +enum class ImageFormat(val value: String) { + JPG("jpg"), + JPEG("jpeg"), + GIF("gif"), + PNG("png"), + WEBP("webp"); + + override fun toString() = value +} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/enums/ImageGravity.kt b/library/src/main/java/io/appwrite/enums/ImageGravity.kt new file mode 100644 index 0000000..a8fa441 --- /dev/null +++ b/library/src/main/java/io/appwrite/enums/ImageGravity.kt @@ -0,0 +1,15 @@ +package io.appwrite.enums + +enum class ImageGravity(val value: String) { + CENTER("center"), + TOPLEFT("top-left"), + TOP("top"), + TOPRIGHT("top-right"), + LEFT("left"), + RIGHT("right"), + BOTTOMLEFT("bottom-left"), + BOTTOM("bottom"), + BOTTOMRIGHT("bottom-right"); + + override fun toString() = value +} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/enums/Method.kt b/library/src/main/java/io/appwrite/enums/Method.kt new file mode 100644 index 0000000..a483270 --- /dev/null +++ b/library/src/main/java/io/appwrite/enums/Method.kt @@ -0,0 +1,12 @@ +package io.appwrite.enums + +enum class Method(val value: String) { + GET("GET"), + POST("POST"), + PUT("PUT"), + PATCH("PATCH"), + DELETE("DELETE"), + OPTIONS("OPTIONS"); + + override fun toString() = value +} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/enums/Provider.kt b/library/src/main/java/io/appwrite/enums/Provider.kt new file mode 100644 index 0000000..472f0d4 --- /dev/null +++ b/library/src/main/java/io/appwrite/enums/Provider.kt @@ -0,0 +1,44 @@ +package io.appwrite.enums + +enum class Provider(val value: String) { + AMAZON("amazon"), + APPLE("apple"), + AUTH0("auth0"), + AUTHENTIK("authentik"), + AUTODESK("autodesk"), + BITBUCKET("bitbucket"), + BITLY("bitly"), + BOX("box"), + DAILYMOTION("dailymotion"), + DISCORD("discord"), + DISQUS("disqus"), + DROPBOX("dropbox"), + ETSY("etsy"), + FACEBOOK("facebook"), + GITHUB("github"), + GITLAB("gitlab"), + GOOGLE("google"), + LINKEDIN("linkedin"), + MICROSOFT("microsoft"), + NOTION("notion"), + OIDC("oidc"), + OKTA("okta"), + PAYPAL("paypal"), + PAYPAL_SANDBOX("paypalSandbox"), + PODIO("podio"), + SALESFORCE("salesforce"), + SLACK("slack"), + SPOTIFY("spotify"), + STRIPE("stripe"), + TRADESHIFT("tradeshift"), + TRADESHIFT_BOX("tradeshiftBox"), + TWITCH("twitch"), + WORDPRESS("wordpress"), + YAHOO("yahoo"), + YAMMER("yammer"), + YANDEX("yandex"), + ZOOM("zoom"), + MOCK("mock"); + + override fun toString() = value +} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/models/Document.kt b/library/src/main/java/io/appwrite/models/Document.kt index 27830d4..5a7d371 100644 --- a/library/src/main/java/io/appwrite/models/Document.kt +++ b/library/src/main/java/io/appwrite/models/Document.kt @@ -38,7 +38,7 @@ data class Document( val updatedAt: String, /** - * Document permissions. [Learn more about permissions](/docs/permissions). + * Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ @SerializedName("\$permissions") val permissions: List, diff --git a/library/src/main/java/io/appwrite/models/File.kt b/library/src/main/java/io/appwrite/models/File.kt index bd35d42..5c2b731 100644 --- a/library/src/main/java/io/appwrite/models/File.kt +++ b/library/src/main/java/io/appwrite/models/File.kt @@ -32,7 +32,7 @@ data class File( val updatedAt: String, /** - * File permissions. [Learn more about permissions](/docs/permissions). + * File permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ @SerializedName("\$permissions") val permissions: List, diff --git a/library/src/main/java/io/appwrite/services/Account.kt b/library/src/main/java/io/appwrite/services/Account.kt index 863ad27..3c9cca1 100644 --- a/library/src/main/java/io/appwrite/services/Account.kt +++ b/library/src/main/java/io/appwrite/services/Account.kt @@ -20,7 +20,7 @@ class Account : Service { public constructor (client: Client) : super(client) { } /** - * Get Account + * Get account * * Get the currently logged in user. * @@ -50,7 +50,7 @@ class Account : Service { } /** - * Get Account + * Get account * * Get the currently logged in user. * @@ -63,9 +63,9 @@ class Account : Service { ) /** - * Create Account + * 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](/docs/client/account#accountCreateVerification) 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](/docs/client/account#accountCreateSession). + * 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 Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param email User email. @@ -106,9 +106,9 @@ class Account : Service { } /** - * Create Account + * 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](/docs/client/account#accountCreateVerification) 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](/docs/client/account#accountCreateSession). + * 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 Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param email User email. @@ -132,7 +132,7 @@ class Account : Service { ) /** - * Update Email + * 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. * @@ -168,7 +168,7 @@ class Account : Service { } /** - * Update Email + * 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. * @@ -280,7 +280,7 @@ class Account : Service { /** - * List Logs + * 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. * @@ -314,7 +314,7 @@ class Account : Service { /** - * Update Name + * Update name * * Update currently logged in user account name. * @@ -347,7 +347,7 @@ class Account : Service { } /** - * Update Name + * Update name * * Update currently logged in user account name. * @@ -363,7 +363,7 @@ class Account : Service { ) /** - * Update Password + * 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. * @@ -400,7 +400,7 @@ class Account : Service { } /** - * Update Password + * 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. * @@ -420,9 +420,9 @@ class Account : Service { ) /** - * Update Phone + * 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](/docs/client/account#accountCreatePhoneVerification) 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. @@ -456,9 +456,9 @@ class Account : Service { } /** - * Update Phone + * 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](/docs/client/account#accountCreatePhoneVerification) 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. @@ -475,7 +475,7 @@ class Account : Service { ) /** - * Get Account Preferences + * Get account preferences * * Get the preferences as a key-value object for the currently logged in user. * @@ -505,7 +505,7 @@ class Account : Service { } /** - * Get Account Preferences + * Get account preferences * * Get the preferences as a key-value object for the currently logged in user. * @@ -518,7 +518,7 @@ class Account : Service { ) /** - * Update Preferences + * 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. * @@ -551,7 +551,7 @@ class Account : Service { } /** - * Update Preferences + * 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. * @@ -567,9 +567,9 @@ class Account : Service { ) /** - * Create Password Recovery + * 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](/docs/client/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour. + * Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour. * * @param email User email. * @param url URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. @@ -603,9 +603,9 @@ class Account : Service { /** - * Create Password Recovery (confirmation) + * 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](/docs/client/account#accountCreateRecovery) endpoint.Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. + * Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint.Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * * @param userId User ID. * @param secret Valid reset token. @@ -645,7 +645,7 @@ class Account : Service { /** - * List Sessions + * List sessions * * Get the list of active sessions across different devices for the currently logged in user. * @@ -675,7 +675,7 @@ class Account : Service { /** - * Delete Sessions + * Delete sessions * * Delete all sessions from the user account and remove any sessions cookies from the end client. * @@ -701,9 +701,9 @@ class Account : Service { /** - * Create Anonymous Session + * 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](/docs/client/account#accountUpdateEmail) or create an [OAuth2 session](/docs/client/account#accountCreateOAuth2Session). + * 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] */ @@ -731,9 +731,9 @@ class Account : Service { /** - * Create Email Session + * Create email 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](/docs/authentication-security#limits). + * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param email User email. * @param password User password. Must be at least 8 chars. @@ -767,9 +767,9 @@ class Account : Service { /** - * Create Magic URL session + * Create magic URL session * - * 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 [PUT /account/sessions/magic-url](/docs/client/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](/docs/authentication-security#limits). + * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#updateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param userId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param email User email. @@ -807,9 +807,9 @@ class Account : Service { /** - * Create Magic URL session (confirmation) + * Create magic URL session (confirmation) * - * Use this endpoint to complete creating the session with the Magic URL. 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/sessions/magic-url](/docs/client/account#accountCreateMagicURLSession) endpoint.Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. + * Use this endpoint to complete creating the session with the Magic URL. 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/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#createMagicURLSession) endpoint.Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * * @param userId User ID. * @param secret Valid verification token. @@ -843,9 +843,9 @@ class Account : Service { /** - * Create OAuth2 Session + * 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](/docs/authentication-security#limits). + * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, 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. @@ -915,9 +915,9 @@ class Account : Service { /** - * Create Phone session + * Create phone session * - * 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 [PUT /account/sessions/phone](/docs/client/account#accountUpdatePhoneSession) 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](/docs/authentication-security#limits). + * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT /account/sessions/phone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param userId Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. @@ -951,9 +951,9 @@ class Account : Service { /** - * Create Phone Session (confirmation) + * Create phone session (confirmation) * - * Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](/docs/client/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session. + * Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session. * * @param userId User ID. * @param secret Valid verification token. @@ -987,7 +987,7 @@ class Account : Service { /** - * Get Session + * 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. * @@ -1020,7 +1020,7 @@ class Account : Service { /** - * Update OAuth Session (Refresh Tokens) + * Update OAuth session (refresh tokens) * * Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to "refresh" the access token. * @@ -1053,9 +1053,9 @@ class Account : Service { /** - * Delete Session + * 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](/docs/client/account#accountDeleteSessions) instead. + * Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead. * * @param sessionId Session ID. Use the string 'current' to delete the current device session. * @return [Any] @@ -1082,7 +1082,7 @@ class Account : Service { /** - * Update Status + * 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. * @@ -1112,7 +1112,7 @@ class Account : Service { } /** - * Update Status + * 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. * @@ -1125,9 +1125,9 @@ class Account : Service { ) /** - * Create Email Verification + * 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](/docs/client/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. + * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * * @param url URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @return [io.appwrite.models.Token] @@ -1158,7 +1158,7 @@ class Account : Service { /** - * Create Email Verification (confirmation) + * 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. * @@ -1194,9 +1194,9 @@ class Account : Service { /** - * Create Phone Verification + * 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](/docs/client/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](/docs/client/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes. + * Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes. * * @return [io.appwrite.models.Token] */ @@ -1224,7 +1224,7 @@ class Account : Service { /** - * Create Phone Verification (confirmation) + * Create 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. * diff --git a/library/src/main/java/io/appwrite/services/Avatars.kt b/library/src/main/java/io/appwrite/services/Avatars.kt index 4ee7c4b..27b7cde 100644 --- a/library/src/main/java/io/appwrite/services/Avatars.kt +++ b/library/src/main/java/io/appwrite/services/Avatars.kt @@ -18,9 +18,9 @@ class Avatars : Service { public constructor (client: Client) : super(client) { } /** - * Get Browser Icon + * 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](/docs/client/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. * * @param code Browser Code. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -54,7 +54,7 @@ class Avatars : Service { /** - * Get Credit Card Icon + * 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. * @@ -90,7 +90,7 @@ class Avatars : Service { /** - * Get Favicon + * Get favicon * * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL. * @@ -116,9 +116,9 @@ class Avatars : Service { /** - * Get Country Flag + * 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](http://en.wikipedia.org/wiki/ISO_3166-1) standard.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. + * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. * * @param code Country Code. ISO Alpha-2 country code format. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -152,7 +152,7 @@ class Avatars : Service { /** - * Get Image from URL + * 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. * @@ -185,7 +185,7 @@ class Avatars : Service { /** - * Get User Initials + * 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. * @@ -221,7 +221,7 @@ class Avatars : Service { /** - * Get QR Code + * 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. * diff --git a/library/src/main/java/io/appwrite/services/Databases.kt b/library/src/main/java/io/appwrite/services/Databases.kt index fcc9f74..4329b35 100644 --- a/library/src/main/java/io/appwrite/services/Databases.kt +++ b/library/src/main/java/io/appwrite/services/Databases.kt @@ -16,7 +16,7 @@ class Databases : Service { public constructor (client: Client) : super(client) { } /** - * List Documents + * 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. * @@ -56,7 +56,7 @@ class Databases : Service { } /** - * List Documents + * 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. * @@ -79,15 +79,15 @@ class Databases : Service { ) /** - * Create Document + * Create document * - * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * 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. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. * @param documentId Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param data Document data as JSON object. - * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions). + * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document] */ @JvmOverloads @@ -125,15 +125,15 @@ class Databases : Service { } /** - * Create Document + * Create document * - * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * 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. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. * @param documentId Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param data Document data as JSON object. - * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions). + * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document] */ @JvmOverloads @@ -154,7 +154,7 @@ class Databases : Service { ) /** - * Get Document + * Get document * * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. * @@ -197,7 +197,7 @@ class Databases : Service { } /** - * Get Document + * Get document * * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. * @@ -223,7 +223,7 @@ class Databases : Service { ) /** - * Update Document + * Update document * * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. * @@ -231,7 +231,7 @@ class Databases : Service { * @param collectionId Collection ID. * @param documentId Document ID. * @param data Document data as JSON object. Include only attribute and value pairs to be updated. - * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions). + * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document] */ @JvmOverloads @@ -269,7 +269,7 @@ class Databases : Service { } /** - * Update Document + * Update document * * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. * @@ -277,7 +277,7 @@ class Databases : Service { * @param collectionId Collection ID. * @param documentId Document ID. * @param data Document data as JSON object. Include only attribute and value pairs to be updated. - * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions). + * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document] */ @JvmOverloads @@ -298,7 +298,7 @@ class Databases : Service { ) /** - * Delete Document + * Delete document * * Delete a document by its unique ID. * diff --git a/library/src/main/java/io/appwrite/services/Functions.kt b/library/src/main/java/io/appwrite/services/Functions.kt index 6b13e67..257a130 100644 --- a/library/src/main/java/io/appwrite/services/Functions.kt +++ b/library/src/main/java/io/appwrite/services/Functions.kt @@ -16,7 +16,7 @@ class Functions : Service { public constructor (client: Client) : super(client) { } /** - * List Executions + * List executions * * Get a list of all the current user function execution logs. You can use the query params to filter your results. * @@ -56,7 +56,7 @@ class Functions : Service { /** - * Create Execution + * 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. * @@ -105,7 +105,7 @@ class Functions : Service { /** - * Get Execution + * Get execution * * Get a function execution log by its unique ID. * diff --git a/library/src/main/java/io/appwrite/services/Graphql.kt b/library/src/main/java/io/appwrite/services/Graphql.kt index dfe884a..3a925d5 100644 --- a/library/src/main/java/io/appwrite/services/Graphql.kt +++ b/library/src/main/java/io/appwrite/services/Graphql.kt @@ -16,7 +16,7 @@ class Graphql : Service { public constructor (client: Client) : super(client) { } /** - * GraphQL Endpoint + * GraphQL endpoint * * Execute a GraphQL mutation. * @@ -50,7 +50,7 @@ class Graphql : Service { /** - * GraphQL Endpoint + * GraphQL endpoint * * Execute a GraphQL mutation. * diff --git a/library/src/main/java/io/appwrite/services/Locale.kt b/library/src/main/java/io/appwrite/services/Locale.kt index 3c3c418..510f451 100644 --- a/library/src/main/java/io/appwrite/services/Locale.kt +++ b/library/src/main/java/io/appwrite/services/Locale.kt @@ -16,7 +16,7 @@ class Locale : Service { public constructor (client: Client) : super(client) { } /** - * Get User Locale + * 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)) * @@ -76,7 +76,7 @@ class Locale : Service { /** - * List Continents + * List continents * * List of all continents. You can use the locale header to get the data in a supported language. * @@ -106,7 +106,7 @@ class Locale : Service { /** - * List Countries + * List countries * * List of all countries. You can use the locale header to get the data in a supported language. * @@ -136,7 +136,7 @@ class Locale : Service { /** - * List EU Countries + * 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. * @@ -166,7 +166,7 @@ class Locale : Service { /** - * List Countries Phone Codes + * List countries phone codes * * List of all countries phone codes. You can use the locale header to get the data in a supported language. * @@ -196,7 +196,7 @@ class Locale : Service { /** - * List Currencies + * 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. * @@ -226,7 +226,7 @@ class Locale : Service { /** - * List Languages + * List languages * * List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language. * diff --git a/library/src/main/java/io/appwrite/services/Storage.kt b/library/src/main/java/io/appwrite/services/Storage.kt index 4d61bbb..2b49f56 100644 --- a/library/src/main/java/io/appwrite/services/Storage.kt +++ b/library/src/main/java/io/appwrite/services/Storage.kt @@ -18,11 +18,11 @@ class Storage : Service { public constructor (client: Client) : super(client) { } /** - * List Files + * 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](/docs/server/storage#createBucket). + * @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 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, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded * @param search Search term to filter your list results. Max length: 256 chars. * @return [io.appwrite.models.FileList] @@ -58,14 +58,14 @@ class Storage : Service { /** - * Create File + * Create file * - * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. + * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. * - * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket). + * @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. - * @param file Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](/docs/storage#file-input). - * @param permissions An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions). + * @param file Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/storage#file-input). + * @param permissions An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.File] */ @JvmOverloads @@ -106,11 +106,11 @@ class Storage : Service { /** - * Get File + * 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](/docs/server/storage#createBucket). + * @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. * @return [io.appwrite.models.File] */ @@ -142,14 +142,14 @@ class Storage : Service { /** - * Update File + * 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](/docs/server/storage#createBucket). + * @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 unique ID. * @param name Name of the file - * @param permissions An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions). + * @param permissions An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.File] */ @JvmOverloads @@ -189,7 +189,7 @@ class Storage : Service { * * 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](/docs/server/storage#createBucket). + * @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. * @return [Any] */ @@ -217,11 +217,11 @@ class Storage : Service { /** - * Get File for Download + * 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](/docs/server/storage#createBucket). + * @param bucketId Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @param fileId File ID. * @return [ByteArray] */ @@ -246,11 +246,11 @@ class Storage : Service { /** - * Get File Preview + * 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](/docs/server/storage#createBucket). + * @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 * @param width Resize preview image width, Pass an integer between 0 to 4000. * @param height Resize preview image height, Pass an integer between 0 to 4000. @@ -309,11 +309,11 @@ class Storage : Service { /** - * Get File for View + * 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](/docs/server/storage#createBucket). + * @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. * @return [ByteArray] */ diff --git a/library/src/main/java/io/appwrite/services/Teams.kt b/library/src/main/java/io/appwrite/services/Teams.kt index 4d48b33..7f303ab 100644 --- a/library/src/main/java/io/appwrite/services/Teams.kt +++ b/library/src/main/java/io/appwrite/services/Teams.kt @@ -16,7 +16,7 @@ class Teams : Service { public constructor (client: Client) : super(client) { } /** - * List Teams + * 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. * @@ -53,7 +53,7 @@ class Teams : Service { } /** - * List Teams + * 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. * @@ -73,13 +73,13 @@ class Teams : Service { ) /** - * Create Team + * 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. * @param name Team name. Max length: 128 chars. - * @param roles Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long. + * @param roles Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. 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. * @return [io.appwrite.models.Team] */ @JvmOverloads @@ -113,13 +113,13 @@ class Teams : Service { } /** - * Create Team + * 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. * @param name Team name. Max length: 128 chars. - * @param roles Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long. + * @param roles Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. 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. * @return [io.appwrite.models.Team] */ @JvmOverloads @@ -136,7 +136,7 @@ class Teams : Service { ) /** - * Get Team + * Get team * * Get a team by its ID. All team members have read access for this resource. * @@ -169,7 +169,7 @@ class Teams : Service { } /** - * Get Team + * Get team * * Get a team by its ID. All team members have read access for this resource. * @@ -185,7 +185,7 @@ class Teams : Service { ) /** - * Update Name + * Update name * * Update the team's name by its unique ID. * @@ -221,7 +221,7 @@ class Teams : Service { } /** - * Update Name + * Update name * * Update the team's name by its unique ID. * @@ -240,7 +240,7 @@ class Teams : Service { ) /** - * Delete Team + * Delete team * * Delete a team using its ID. Only team members with the owner role can delete the team. * @@ -269,7 +269,7 @@ class Teams : Service { /** - * List Team Memberships + * 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. * @@ -309,12 +309,12 @@ class Teams : Service { /** - * Create Team Membership + * 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](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. + * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. * * @param teamId Team ID. - * @param roles Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long. + * @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. * @param email Email of the new team member. * @param userId ID of the user to be added to a team. * @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. @@ -361,7 +361,7 @@ class Teams : Service { /** - * Get Team Membership + * Get team membership * * Get a team member by the membership unique id. All team members have read access for this resource. * @@ -397,9 +397,9 @@ class Teams : Service { /** - * Update Membership + * 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](/docs/permissions). + * 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. @@ -436,7 +436,7 @@ class Teams : Service { /** - * Delete Team Membership + * 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. * @@ -468,7 +468,7 @@ class Teams : Service { /** - * Update Team Membership Status + * 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. * @@ -510,9 +510,9 @@ class Teams : Service { /** - * Get Team Preferences + * 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](/docs/client/account#accountGetPrefs). + * 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] @@ -543,9 +543,9 @@ class Teams : Service { } /** - * Get Team Preferences + * 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](/docs/client/account#accountGetPrefs). + * 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] @@ -559,7 +559,7 @@ class Teams : Service { ) /** - * Update Preferences + * 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. * @@ -595,7 +595,7 @@ class Teams : Service { } /** - * Update Preferences + * 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. * From 312f026b41b8d4e74688ba82ff3174ee2f26a710 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 16 Nov 2023 17:09:12 +1300 Subject: [PATCH 2/2] Fix between query output --- .../main/java/io/appwrite/enums/Browser.kt | 20 -- .../main/java/io/appwrite/enums/CreditCard.kt | 22 -- .../src/main/java/io/appwrite/enums/Flag.kt | 200 ------------------ .../java/io/appwrite/enums/ImageFormat.kt | 11 - .../java/io/appwrite/enums/ImageGravity.kt | 15 -- .../src/main/java/io/appwrite/enums/Method.kt | 12 -- .../main/java/io/appwrite/enums/Provider.kt | 44 ---- 7 files changed, 324 deletions(-) delete mode 100644 library/src/main/java/io/appwrite/enums/Browser.kt delete mode 100644 library/src/main/java/io/appwrite/enums/CreditCard.kt delete mode 100644 library/src/main/java/io/appwrite/enums/Flag.kt delete mode 100644 library/src/main/java/io/appwrite/enums/ImageFormat.kt delete mode 100644 library/src/main/java/io/appwrite/enums/ImageGravity.kt delete mode 100644 library/src/main/java/io/appwrite/enums/Method.kt delete mode 100644 library/src/main/java/io/appwrite/enums/Provider.kt diff --git a/library/src/main/java/io/appwrite/enums/Browser.kt b/library/src/main/java/io/appwrite/enums/Browser.kt deleted file mode 100644 index 99f598e..0000000 --- a/library/src/main/java/io/appwrite/enums/Browser.kt +++ /dev/null @@ -1,20 +0,0 @@ -package io.appwrite.enums - -enum class Browser(val value: String) { - AVANT_BROWSER("aa"), - ANDROID_WEB_VIEW_BETA("an"), - GOOGLE_CHROME("ch"), - GOOGLE_CHROMEI_OS("ci"), - GOOGLE_CHROME_MOBILE("cm"), - CHROMIUM("cr"), - MOZILLA_FIREFOX("ff"), - SAFARI("sf"), - MOBILE_SAFARI("mf"), - MICROSOFT_EDGE("ps"), - MICROSOFT_EDGEI_OS("oi"), - OPERA_MINI("om"), - OPERA("op"), - OPERA_NEXT("on"); - - override fun toString() = value -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/enums/CreditCard.kt b/library/src/main/java/io/appwrite/enums/CreditCard.kt deleted file mode 100644 index e99519b..0000000 --- a/library/src/main/java/io/appwrite/enums/CreditCard.kt +++ /dev/null @@ -1,22 +0,0 @@ -package io.appwrite.enums - -enum class CreditCard(val value: String) { - AMERICAN_EXPRESS("amex"), - ARGENCARD("argencard"), - CABAL("cabal"), - CONSOSUD("censosud"), - DINERS_CLUB("diners"), - DISCOVER("discover"), - ELO("elo"), - HIPERCARD("hipercard"), - JCB("jcb"), - MASTERCARD("mastercard"), - NARANJA("naranja"), - TARJETA_SHOPPING("targeta-shopping"), - UNION_CHINA_PAY("union-china-pay"), - VISA("visa"), - MIR("mir"), - MAESTRO("maestro"); - - override fun toString() = value -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/enums/Flag.kt b/library/src/main/java/io/appwrite/enums/Flag.kt deleted file mode 100644 index 4fcdd88..0000000 --- a/library/src/main/java/io/appwrite/enums/Flag.kt +++ /dev/null @@ -1,200 +0,0 @@ -package io.appwrite.enums - -enum class Flag(val value: String) { - AFGHANISTAN("af"), - ANGOLA("ao"), - ALBANIA("al"), - ANDORRA("ad"), - UNITED_ARAB_EMIRATES("ae"), - ARGENTINA("ar"), - ARMENIA("am"), - ANTIGUAAND_BARBUDA("ag"), - AUSTRALIA("au"), - AUSTRIA("at"), - AZERBAIJAN("az"), - BURUNDI("bi"), - BELGIUM("be"), - BENIN("bj"), - BURKINA_FASO("bf"), - BANGLADESH("bd"), - BULGARIA("bg"), - BAHRAIN("bh"), - BAHAMAS("bs"), - BOSNIAAND_HERZEGOVINA("ba"), - BELARUS("by"), - BELIZE("bz"), - BOLIVIA("bo"), - BRAZIL("br"), - BARBADOS("bb"), - BRUNEI_DARUSSALAM("bn"), - BHUTAN("bt"), - BOTSWANA("bw"), - CENTRAL_AFRICAN_REPUBLIC("cf"), - CANADA("ca"), - SWITZERLAND("ch"), - CHILE("cl"), - CHINA("cn"), - CTED_IVOIRE("ci"), - CAMEROON("cm"), - DEMOCRATIC_REPUBLICOFTHE_CONGO("cd"), - REPUBLICOFTHE_CONGO("cg"), - COLOMBIA("co"), - COMOROS("km"), - CAPE_VERDE("cv"), - COSTA_RICA("cr"), - CUBA("cu"), - CYPRUS("cy"), - CZECH_REPUBLIC("cz"), - GERMANY("de"), - DJIBOUTI("dj"), - DOMINICA("dm"), - DENMARK("dk"), - DOMINICAN_REPUBLIC("do"), - ALGERIA("dz"), - ECUADOR("ec"), - EGYPT("eg"), - ERITREA("er"), - SPAIN("es"), - ESTONIA("ee"), - ETHIOPIA("et"), - FINLAND("fi"), - FIJI("fj"), - FRANCE("fr"), - MICRONESIA_FEDERATED_STATESOF("fm"), - GABON("ga"), - UNITED_KINGDOM("gb"), - GEORGIA("ge"), - GHANA("gh"), - GUINEA("gn"), - GAMBIA("gm"), - GUINEA_BISSAU("gw"), - EQUATORIAL_GUINEA("gq"), - GREECE("gr"), - GRENADA("gd"), - GUATEMALA("gt"), - GUYANA("gy"), - HONDURAS("hn"), - CROATIA("hr"), - HAITI("ht"), - HUNGARY("hu"), - INDONESIA("id"), - INDIA("in"), - IRELAND("ie"), - IRAN_ISLAMIC_REPUBLICOF("ir"), - IRAQ("iq"), - ICELAND("is"), - ISRAEL("il"), - ITALY("it"), - JAMAICA("jm"), - JORDAN("jo"), - JAPAN("jp"), - KAZAKHSTAN("kz"), - KENYA("ke"), - KYRGYZSTAN("kg"), - CAMBODIA("kh"), - KIRIBATI("ki"), - SAINT_KITTSAND_NEVIS("kn"), - SOUTH_KOREA("kr"), - KUWAIT("kw"), - LAO_PEOPLES_DEMOCRATIC_REPUBLIC("la"), - LEBANON("lb"), - LIBERIA("lr"), - LIBYA("ly"), - SAINT_LUCIA("lc"), - LIECHTENSTEIN("li"), - SRI_LANKA("lk"), - LESOTHO("ls"), - LITHUANIA("lt"), - LUXEMBOURG("lu"), - LATVIA("lv"), - MOROCCO("ma"), - MONACO("mc"), - MOLDOVA("md"), - MADAGASCAR("mg"), - MALDIVES("mv"), - MEXICO("mx"), - MARSHALL_ISLANDS("mh"), - NORTH_MACEDONIA("mk"), - MALI("ml"), - MALTA("mt"), - MYANMAR("mm"), - MONTENEGRO("me"), - MONGOLIA("mn"), - MOZAMBIQUE("mz"), - MAURITANIA("mr"), - MAURITIUS("mu"), - MALAWI("mw"), - MALAYSIA("my"), - NAMIBIA("na"), - NIGER("ne"), - NIGERIA("ng"), - NICARAGUA("ni"), - NETHERLANDS("nl"), - NORWAY("no"), - NEPAL("np"), - NAURU("nr"), - NEW_ZEALAND("nz"), - OMAN("om"), - PAKISTAN("pk"), - PANAMA("pa"), - PERU("pe"), - PHILIPPINES("ph"), - PALAU("pw"), - PAPUA_NEW_GUINEA("pg"), - POLAND("pl"), - NORTH_KOREA("kp"), - PORTUGAL("pt"), - PARAGUAY("py"), - QATAR("qa"), - ROMANIA("ro"), - RUSSIA("ru"), - RWANDA("rw"), - SAUDI_ARABIA("sa"), - SUDAN("sd"), - SENEGAL("sn"), - SINGAPORE("sg"), - SOLOMON_ISLANDS("sb"), - SIERRA_LEONE("sl"), - EL_SALVADOR("sv"), - SAN_MARINO("sm"), - SOMALIA("so"), - SERBIA("rs"), - SOUTH_SUDAN("ss"), - SAO_TOMEAND_PRINCIPE("st"), - SURINAME("sr"), - SLOVAKIA("sk"), - SLOVENIA("si"), - SWEDEN("se"), - ESWATINI("sz"), - SEYCHELLES("sc"), - SYRIA("sy"), - CHAD("td"), - TOGO("tg"), - THAILAND("th"), - TAJIKISTAN("tj"), - TURKMENISTAN("tm"), - TIMOR_LESTE("tl"), - TONGA("to"), - TRINIDADAND_TOBAGO("tt"), - TUNISIA("tn"), - TURKEY("tr"), - TUVALU("tv"), - TANZANIA("tz"), - UGANDA("ug"), - UKRAINE("ua"), - URUGUAY("uy"), - UNITED_STATES("us"), - UZBEKISTAN("uz"), - VATICAN_CITY("va"), - SAINT_VINCENTANDTHE_GRENADINES("vc"), - VENEZUELA("ve"), - VIETNAM("vn"), - VANUATU("vu"), - SAMOA("ws"), - YEMEN("ye"), - SOUTH_AFRICA("za"), - ZAMBIA("zm"), - ZIMBABWE("zw"); - - override fun toString() = value -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/enums/ImageFormat.kt b/library/src/main/java/io/appwrite/enums/ImageFormat.kt deleted file mode 100644 index 6a4c422..0000000 --- a/library/src/main/java/io/appwrite/enums/ImageFormat.kt +++ /dev/null @@ -1,11 +0,0 @@ -package io.appwrite.enums - -enum class ImageFormat(val value: String) { - JPG("jpg"), - JPEG("jpeg"), - GIF("gif"), - PNG("png"), - WEBP("webp"); - - override fun toString() = value -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/enums/ImageGravity.kt b/library/src/main/java/io/appwrite/enums/ImageGravity.kt deleted file mode 100644 index a8fa441..0000000 --- a/library/src/main/java/io/appwrite/enums/ImageGravity.kt +++ /dev/null @@ -1,15 +0,0 @@ -package io.appwrite.enums - -enum class ImageGravity(val value: String) { - CENTER("center"), - TOPLEFT("top-left"), - TOP("top"), - TOPRIGHT("top-right"), - LEFT("left"), - RIGHT("right"), - BOTTOMLEFT("bottom-left"), - BOTTOM("bottom"), - BOTTOMRIGHT("bottom-right"); - - override fun toString() = value -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/enums/Method.kt b/library/src/main/java/io/appwrite/enums/Method.kt deleted file mode 100644 index a483270..0000000 --- a/library/src/main/java/io/appwrite/enums/Method.kt +++ /dev/null @@ -1,12 +0,0 @@ -package io.appwrite.enums - -enum class Method(val value: String) { - GET("GET"), - POST("POST"), - PUT("PUT"), - PATCH("PATCH"), - DELETE("DELETE"), - OPTIONS("OPTIONS"); - - override fun toString() = value -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/enums/Provider.kt b/library/src/main/java/io/appwrite/enums/Provider.kt deleted file mode 100644 index 472f0d4..0000000 --- a/library/src/main/java/io/appwrite/enums/Provider.kt +++ /dev/null @@ -1,44 +0,0 @@ -package io.appwrite.enums - -enum class Provider(val value: String) { - AMAZON("amazon"), - APPLE("apple"), - AUTH0("auth0"), - AUTHENTIK("authentik"), - AUTODESK("autodesk"), - BITBUCKET("bitbucket"), - BITLY("bitly"), - BOX("box"), - DAILYMOTION("dailymotion"), - DISCORD("discord"), - DISQUS("disqus"), - DROPBOX("dropbox"), - ETSY("etsy"), - FACEBOOK("facebook"), - GITHUB("github"), - GITLAB("gitlab"), - GOOGLE("google"), - LINKEDIN("linkedin"), - MICROSOFT("microsoft"), - NOTION("notion"), - OIDC("oidc"), - OKTA("okta"), - PAYPAL("paypal"), - PAYPAL_SANDBOX("paypalSandbox"), - PODIO("podio"), - SALESFORCE("salesforce"), - SLACK("slack"), - SPOTIFY("spotify"), - STRIPE("stripe"), - TRADESHIFT("tradeshift"), - TRADESHIFT_BOX("tradeshiftBox"), - TWITCH("twitch"), - WORDPRESS("wordpress"), - YAHOO("yahoo"), - YAMMER("yammer"), - YANDEX("yandex"), - ZOOM("zoom"), - MOCK("mock"); - - override fun toString() = value -} \ No newline at end of file