diff --git a/README.md b/README.md index 7e98220f..b70648c8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) -**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-android/releases).** +**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-android/releases).** Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Android SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) diff --git a/docs/examples/kotlin/account/create-email-password-session.md b/docs/examples/kotlin/account/create-email-password-session.md index b3f63d8a..6100e483 100644 --- a/docs/examples/kotlin/account/create-email-password-session.md +++ b/docs/examples/kotlin/account/create-email-password-session.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.createEmailPasswordSession( email = "email@example.com", password = "password", -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-email-token.md b/docs/examples/kotlin/account/create-email-token.md index f78bb74e..01dda3d6 100644 --- a/docs/examples/kotlin/account/create-email-token.md +++ b/docs/examples/kotlin/account/create-email-token.md @@ -13,4 +13,5 @@ val result = account.createEmailToken( userId = "", email = "email@example.com", phrase = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-email-verification.md b/docs/examples/kotlin/account/create-email-verification.md index 3912e3b6..2a0d00e9 100644 --- a/docs/examples/kotlin/account/create-email-verification.md +++ b/docs/examples/kotlin/account/create-email-verification.md @@ -11,4 +11,5 @@ val account = Account(client) val result = account.createEmailVerification( url = "https://example.com", -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-jwt.md b/docs/examples/kotlin/account/create-jwt.md index d90c10e5..79d7b099 100644 --- a/docs/examples/kotlin/account/create-jwt.md +++ b/docs/examples/kotlin/account/create-jwt.md @@ -11,4 +11,5 @@ val account = Account(client) val result = account.createJWT( duration = 0, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-magic-url-token.md b/docs/examples/kotlin/account/create-magic-url-token.md index 0965f214..62904044 100644 --- a/docs/examples/kotlin/account/create-magic-url-token.md +++ b/docs/examples/kotlin/account/create-magic-url-token.md @@ -14,4 +14,5 @@ val result = account.createMagicURLToken( email = "email@example.com", url = "https://example.com", // (optional) phrase = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-mfa-authenticator.md b/docs/examples/kotlin/account/create-mfa-authenticator.md index c8f8d9a4..132bf749 100644 --- a/docs/examples/kotlin/account/create-mfa-authenticator.md +++ b/docs/examples/kotlin/account/create-mfa-authenticator.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.createMFAAuthenticator( type = AuthenticatorType.TOTP, -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-mfa-challenge.md b/docs/examples/kotlin/account/create-mfa-challenge.md index c40512dd..92206fab 100644 --- a/docs/examples/kotlin/account/create-mfa-challenge.md +++ b/docs/examples/kotlin/account/create-mfa-challenge.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.createMFAChallenge( factor = AuthenticationFactor.EMAIL, -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-o-auth-2-session.md b/docs/examples/kotlin/account/create-o-auth-2-session.md index 18cb2361..cde941c7 100644 --- a/docs/examples/kotlin/account/create-o-auth-2-session.md +++ b/docs/examples/kotlin/account/create-o-auth-2-session.md @@ -15,4 +15,5 @@ account.createOAuth2Session( success = "https://example.com", // (optional) failure = "https://example.com", // (optional) scopes = listOf(), // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-o-auth-2-token.md b/docs/examples/kotlin/account/create-o-auth-2-token.md index 52c0eea0..5e905649 100644 --- a/docs/examples/kotlin/account/create-o-auth-2-token.md +++ b/docs/examples/kotlin/account/create-o-auth-2-token.md @@ -15,4 +15,5 @@ account.createOAuth2Token( success = "https://example.com", // (optional) failure = "https://example.com", // (optional) scopes = listOf(), // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-phone-token.md b/docs/examples/kotlin/account/create-phone-token.md index 8ee75ceb..3a61bac7 100644 --- a/docs/examples/kotlin/account/create-phone-token.md +++ b/docs/examples/kotlin/account/create-phone-token.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.createPhoneToken( userId = "", phone = "+12065550100", -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-push-target.md b/docs/examples/kotlin/account/create-push-target.md index b4641017..22d64cb9 100644 --- a/docs/examples/kotlin/account/create-push-target.md +++ b/docs/examples/kotlin/account/create-push-target.md @@ -13,4 +13,5 @@ val result = account.createPushTarget( targetId = "", identifier = "", providerId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-recovery.md b/docs/examples/kotlin/account/create-recovery.md index e8448a61..1a89cccc 100644 --- a/docs/examples/kotlin/account/create-recovery.md +++ b/docs/examples/kotlin/account/create-recovery.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.createRecovery( email = "email@example.com", url = "https://example.com", -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-session.md b/docs/examples/kotlin/account/create-session.md index e5273ce9..b86495cf 100644 --- a/docs/examples/kotlin/account/create-session.md +++ b/docs/examples/kotlin/account/create-session.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.createSession( userId = "", secret = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/create-verification.md b/docs/examples/kotlin/account/create-verification.md index 4f39b39a..d8ad1bc5 100644 --- a/docs/examples/kotlin/account/create-verification.md +++ b/docs/examples/kotlin/account/create-verification.md @@ -11,4 +11,5 @@ val account = Account(client) val result = account.createVerification( url = "https://example.com", -)``` +) +``` diff --git a/docs/examples/kotlin/account/create.md b/docs/examples/kotlin/account/create.md index fccaf308..9f80913a 100644 --- a/docs/examples/kotlin/account/create.md +++ b/docs/examples/kotlin/account/create.md @@ -14,4 +14,5 @@ val result = account.create( email = "email@example.com", password = "", name = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/account/delete-identity.md b/docs/examples/kotlin/account/delete-identity.md index fc3aba69..7efc1d7c 100644 --- a/docs/examples/kotlin/account/delete-identity.md +++ b/docs/examples/kotlin/account/delete-identity.md @@ -11,4 +11,5 @@ val account = Account(client) val result = account.deleteIdentity( identityId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/delete-mfa-authenticator.md b/docs/examples/kotlin/account/delete-mfa-authenticator.md index 0f453183..77a68a07 100644 --- a/docs/examples/kotlin/account/delete-mfa-authenticator.md +++ b/docs/examples/kotlin/account/delete-mfa-authenticator.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.deleteMFAAuthenticator( type = AuthenticatorType.TOTP, -)``` +) +``` diff --git a/docs/examples/kotlin/account/delete-push-target.md b/docs/examples/kotlin/account/delete-push-target.md index 49e33bb3..6fce7b7c 100644 --- a/docs/examples/kotlin/account/delete-push-target.md +++ b/docs/examples/kotlin/account/delete-push-target.md @@ -11,4 +11,5 @@ val account = Account(client) val result = account.deletePushTarget( targetId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/delete-session.md b/docs/examples/kotlin/account/delete-session.md index 91013ce9..de938117 100644 --- a/docs/examples/kotlin/account/delete-session.md +++ b/docs/examples/kotlin/account/delete-session.md @@ -11,4 +11,5 @@ val account = Account(client) val result = account.deleteSession( sessionId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/get-session.md b/docs/examples/kotlin/account/get-session.md index fbf7f104..29bac94c 100644 --- a/docs/examples/kotlin/account/get-session.md +++ b/docs/examples/kotlin/account/get-session.md @@ -11,4 +11,5 @@ val account = Account(client) val result = account.getSession( sessionId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/list-identities.md b/docs/examples/kotlin/account/list-identities.md index 0ca7466d..9037c0e6 100644 --- a/docs/examples/kotlin/account/list-identities.md +++ b/docs/examples/kotlin/account/list-identities.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.listIdentities( queries = listOf(), // (optional) total = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/account/list-logs.md b/docs/examples/kotlin/account/list-logs.md index ce425646..0bccbf25 100644 --- a/docs/examples/kotlin/account/list-logs.md +++ b/docs/examples/kotlin/account/list-logs.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.listLogs( queries = listOf(), // (optional) total = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-email-verification.md b/docs/examples/kotlin/account/update-email-verification.md index a2555642..cfc5d671 100644 --- a/docs/examples/kotlin/account/update-email-verification.md +++ b/docs/examples/kotlin/account/update-email-verification.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.updateEmailVerification( userId = "", secret = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-email.md b/docs/examples/kotlin/account/update-email.md index ff80d07a..dc4bcbf3 100644 --- a/docs/examples/kotlin/account/update-email.md +++ b/docs/examples/kotlin/account/update-email.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.updateEmail( email = "email@example.com", password = "password", -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-magic-url-session.md b/docs/examples/kotlin/account/update-magic-url-session.md index c00fbd12..d943ac6a 100644 --- a/docs/examples/kotlin/account/update-magic-url-session.md +++ b/docs/examples/kotlin/account/update-magic-url-session.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.updateMagicURLSession( userId = "", secret = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-mfa-authenticator.md b/docs/examples/kotlin/account/update-mfa-authenticator.md index 26958a49..9befabe9 100644 --- a/docs/examples/kotlin/account/update-mfa-authenticator.md +++ b/docs/examples/kotlin/account/update-mfa-authenticator.md @@ -13,4 +13,5 @@ val account = Account(client) val result = account.updateMFAAuthenticator( type = AuthenticatorType.TOTP, otp = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-mfa-challenge.md b/docs/examples/kotlin/account/update-mfa-challenge.md index d48e0c22..6f2e99c0 100644 --- a/docs/examples/kotlin/account/update-mfa-challenge.md +++ b/docs/examples/kotlin/account/update-mfa-challenge.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.updateMFAChallenge( challengeId = "", otp = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-mfa.md b/docs/examples/kotlin/account/update-mfa.md index 246bfe18..6acd1e70 100644 --- a/docs/examples/kotlin/account/update-mfa.md +++ b/docs/examples/kotlin/account/update-mfa.md @@ -11,4 +11,5 @@ val account = Account(client) val result = account.updateMFA( mfa = false, -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-name.md b/docs/examples/kotlin/account/update-name.md index 1ada95aa..ed40f240 100644 --- a/docs/examples/kotlin/account/update-name.md +++ b/docs/examples/kotlin/account/update-name.md @@ -11,4 +11,5 @@ val account = Account(client) val result = account.updateName( name = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-password.md b/docs/examples/kotlin/account/update-password.md index 473cd1bf..ce9ae904 100644 --- a/docs/examples/kotlin/account/update-password.md +++ b/docs/examples/kotlin/account/update-password.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.updatePassword( password = "", oldPassword = "password", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-phone-session.md b/docs/examples/kotlin/account/update-phone-session.md index 0788763a..ea5f25b5 100644 --- a/docs/examples/kotlin/account/update-phone-session.md +++ b/docs/examples/kotlin/account/update-phone-session.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.updatePhoneSession( userId = "", secret = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-phone-verification.md b/docs/examples/kotlin/account/update-phone-verification.md index 36abe384..c68d213a 100644 --- a/docs/examples/kotlin/account/update-phone-verification.md +++ b/docs/examples/kotlin/account/update-phone-verification.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.updatePhoneVerification( userId = "", secret = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-phone.md b/docs/examples/kotlin/account/update-phone.md index 078851d3..b7e669b0 100644 --- a/docs/examples/kotlin/account/update-phone.md +++ b/docs/examples/kotlin/account/update-phone.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.updatePhone( phone = "+12065550100", password = "password", -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-prefs.md b/docs/examples/kotlin/account/update-prefs.md index 5c3b6911..4444fb96 100644 --- a/docs/examples/kotlin/account/update-prefs.md +++ b/docs/examples/kotlin/account/update-prefs.md @@ -15,4 +15,5 @@ val result = account.updatePrefs( "timezone" to "UTC", "darkTheme" to true ), -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-push-target.md b/docs/examples/kotlin/account/update-push-target.md index 3e4abbdb..0e16e2fe 100644 --- a/docs/examples/kotlin/account/update-push-target.md +++ b/docs/examples/kotlin/account/update-push-target.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.updatePushTarget( targetId = "", identifier = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-recovery.md b/docs/examples/kotlin/account/update-recovery.md index 5dcb265f..8e16074e 100644 --- a/docs/examples/kotlin/account/update-recovery.md +++ b/docs/examples/kotlin/account/update-recovery.md @@ -13,4 +13,5 @@ val result = account.updateRecovery( userId = "", secret = "", password = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-session.md b/docs/examples/kotlin/account/update-session.md index 343c673a..b29ece55 100644 --- a/docs/examples/kotlin/account/update-session.md +++ b/docs/examples/kotlin/account/update-session.md @@ -11,4 +11,5 @@ val account = Account(client) val result = account.updateSession( sessionId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/account/update-verification.md b/docs/examples/kotlin/account/update-verification.md index 34a118c6..1c4af79e 100644 --- a/docs/examples/kotlin/account/update-verification.md +++ b/docs/examples/kotlin/account/update-verification.md @@ -12,4 +12,5 @@ val account = Account(client) val result = account.updateVerification( userId = "", secret = "", -)``` +) +``` diff --git a/docs/examples/kotlin/avatars/get-browser.md b/docs/examples/kotlin/avatars/get-browser.md index 3ac128eb..7c32ad2d 100644 --- a/docs/examples/kotlin/avatars/get-browser.md +++ b/docs/examples/kotlin/avatars/get-browser.md @@ -15,4 +15,5 @@ val result = avatars.getBrowser( width = 0, // (optional) height = 0, // (optional) quality = -1, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/avatars/get-credit-card.md b/docs/examples/kotlin/avatars/get-credit-card.md index b61670bf..54244acc 100644 --- a/docs/examples/kotlin/avatars/get-credit-card.md +++ b/docs/examples/kotlin/avatars/get-credit-card.md @@ -15,4 +15,5 @@ val result = avatars.getCreditCard( width = 0, // (optional) height = 0, // (optional) quality = -1, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/avatars/get-favicon.md b/docs/examples/kotlin/avatars/get-favicon.md index 71a798c7..d55a0b42 100644 --- a/docs/examples/kotlin/avatars/get-favicon.md +++ b/docs/examples/kotlin/avatars/get-favicon.md @@ -11,4 +11,5 @@ val avatars = Avatars(client) val result = avatars.getFavicon( url = "https://example.com", -)``` +) +``` diff --git a/docs/examples/kotlin/avatars/get-flag.md b/docs/examples/kotlin/avatars/get-flag.md index 097143c4..c03ccb3f 100644 --- a/docs/examples/kotlin/avatars/get-flag.md +++ b/docs/examples/kotlin/avatars/get-flag.md @@ -15,4 +15,5 @@ val result = avatars.getFlag( width = 0, // (optional) height = 0, // (optional) quality = -1, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/avatars/get-image.md b/docs/examples/kotlin/avatars/get-image.md index f2d01c19..4e22185d 100644 --- a/docs/examples/kotlin/avatars/get-image.md +++ b/docs/examples/kotlin/avatars/get-image.md @@ -13,4 +13,5 @@ val result = avatars.getImage( url = "https://example.com", width = 0, // (optional) height = 0, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/avatars/get-initials.md b/docs/examples/kotlin/avatars/get-initials.md index d689eace..1cb76a18 100644 --- a/docs/examples/kotlin/avatars/get-initials.md +++ b/docs/examples/kotlin/avatars/get-initials.md @@ -14,4 +14,5 @@ val result = avatars.getInitials( width = 0, // (optional) height = 0, // (optional) background = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/avatars/get-qr.md b/docs/examples/kotlin/avatars/get-qr.md index 4dca2bba..e962ef30 100644 --- a/docs/examples/kotlin/avatars/get-qr.md +++ b/docs/examples/kotlin/avatars/get-qr.md @@ -14,4 +14,5 @@ val result = avatars.getQR( size = 1, // (optional) margin = 0, // (optional) download = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/avatars/get-screenshot.md b/docs/examples/kotlin/avatars/get-screenshot.md index 1cc4ef25..94551fdb 100644 --- a/docs/examples/kotlin/avatars/get-screenshot.md +++ b/docs/examples/kotlin/avatars/get-screenshot.md @@ -37,4 +37,5 @@ val result = avatars.getScreenshot( height = 600, // (optional) quality = 85, // (optional) output = ImageFormat.JPG, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/databases/create-document.md b/docs/examples/kotlin/databases/create-document.md index 5f4aa352..7105df5c 100644 --- a/docs/examples/kotlin/databases/create-document.md +++ b/docs/examples/kotlin/databases/create-document.md @@ -24,4 +24,5 @@ val result = databases.createDocument( ), permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/databases/create-operations.md b/docs/examples/kotlin/databases/create-operations.md index a988c08c..3bd7ae5d 100644 --- a/docs/examples/kotlin/databases/create-operations.md +++ b/docs/examples/kotlin/databases/create-operations.md @@ -20,4 +20,5 @@ val result = databases.createOperations( "name" to "Walter O'Brien" ) )), // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/databases/create-transaction.md b/docs/examples/kotlin/databases/create-transaction.md index dd61947f..59a3c12f 100644 --- a/docs/examples/kotlin/databases/create-transaction.md +++ b/docs/examples/kotlin/databases/create-transaction.md @@ -11,4 +11,5 @@ val databases = Databases(client) val result = databases.createTransaction( ttl = 60, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/databases/decrement-document-attribute.md b/docs/examples/kotlin/databases/decrement-document-attribute.md index 8b9cb078..9ca780fd 100644 --- a/docs/examples/kotlin/databases/decrement-document-attribute.md +++ b/docs/examples/kotlin/databases/decrement-document-attribute.md @@ -17,4 +17,5 @@ val result = databases.decrementDocumentAttribute( value = 0, // (optional) min = 0, // (optional) transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/databases/delete-document.md b/docs/examples/kotlin/databases/delete-document.md index 99e40c19..c31bdb9f 100644 --- a/docs/examples/kotlin/databases/delete-document.md +++ b/docs/examples/kotlin/databases/delete-document.md @@ -14,4 +14,5 @@ val result = databases.deleteDocument( collectionId = "", documentId = "", transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/databases/delete-transaction.md b/docs/examples/kotlin/databases/delete-transaction.md index 302c3644..101bd8cd 100644 --- a/docs/examples/kotlin/databases/delete-transaction.md +++ b/docs/examples/kotlin/databases/delete-transaction.md @@ -11,4 +11,5 @@ val databases = Databases(client) val result = databases.deleteTransaction( transactionId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/databases/get-document.md b/docs/examples/kotlin/databases/get-document.md index 9bae4190..5c54be0c 100644 --- a/docs/examples/kotlin/databases/get-document.md +++ b/docs/examples/kotlin/databases/get-document.md @@ -15,4 +15,5 @@ val result = databases.getDocument( documentId = "", queries = listOf(), // (optional) transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/databases/get-transaction.md b/docs/examples/kotlin/databases/get-transaction.md index 25249ecd..2f08ad61 100644 --- a/docs/examples/kotlin/databases/get-transaction.md +++ b/docs/examples/kotlin/databases/get-transaction.md @@ -11,4 +11,5 @@ val databases = Databases(client) val result = databases.getTransaction( transactionId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/databases/increment-document-attribute.md b/docs/examples/kotlin/databases/increment-document-attribute.md index 78c311e6..20afc996 100644 --- a/docs/examples/kotlin/databases/increment-document-attribute.md +++ b/docs/examples/kotlin/databases/increment-document-attribute.md @@ -17,4 +17,5 @@ val result = databases.incrementDocumentAttribute( value = 0, // (optional) max = 0, // (optional) transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/databases/list-documents.md b/docs/examples/kotlin/databases/list-documents.md index dc086332..485ce792 100644 --- a/docs/examples/kotlin/databases/list-documents.md +++ b/docs/examples/kotlin/databases/list-documents.md @@ -15,4 +15,5 @@ val result = databases.listDocuments( queries = listOf(), // (optional) transactionId = "", // (optional) total = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/databases/list-transactions.md b/docs/examples/kotlin/databases/list-transactions.md index 43e0aba5..3cabd79f 100644 --- a/docs/examples/kotlin/databases/list-transactions.md +++ b/docs/examples/kotlin/databases/list-transactions.md @@ -11,4 +11,5 @@ val databases = Databases(client) val result = databases.listTransactions( queries = listOf(), // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/databases/update-document.md b/docs/examples/kotlin/databases/update-document.md index 585ae4c0..5c8a5e31 100644 --- a/docs/examples/kotlin/databases/update-document.md +++ b/docs/examples/kotlin/databases/update-document.md @@ -24,4 +24,5 @@ val result = databases.updateDocument( ), // (optional) permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/databases/update-transaction.md b/docs/examples/kotlin/databases/update-transaction.md index c2e38aea..88360b27 100644 --- a/docs/examples/kotlin/databases/update-transaction.md +++ b/docs/examples/kotlin/databases/update-transaction.md @@ -13,4 +13,5 @@ val result = databases.updateTransaction( transactionId = "", commit = false, // (optional) rollback = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/databases/upsert-document.md b/docs/examples/kotlin/databases/upsert-document.md index d591f22a..edecb863 100644 --- a/docs/examples/kotlin/databases/upsert-document.md +++ b/docs/examples/kotlin/databases/upsert-document.md @@ -24,4 +24,5 @@ val result = databases.upsertDocument( ), // (optional) permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/functions/create-execution.md b/docs/examples/kotlin/functions/create-execution.md index 5037cab5..13654e65 100644 --- a/docs/examples/kotlin/functions/create-execution.md +++ b/docs/examples/kotlin/functions/create-execution.md @@ -18,4 +18,5 @@ val result = functions.createExecution( method = ExecutionMethod.GET, // (optional) headers = mapOf( "a" to "b" ), // (optional) scheduledAt = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/functions/get-execution.md b/docs/examples/kotlin/functions/get-execution.md index e39fb7e8..c092909e 100644 --- a/docs/examples/kotlin/functions/get-execution.md +++ b/docs/examples/kotlin/functions/get-execution.md @@ -12,4 +12,5 @@ val functions = Functions(client) val result = functions.getExecution( functionId = "", executionId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/functions/list-executions.md b/docs/examples/kotlin/functions/list-executions.md index 9d2b0591..5fb16f85 100644 --- a/docs/examples/kotlin/functions/list-executions.md +++ b/docs/examples/kotlin/functions/list-executions.md @@ -13,4 +13,5 @@ val result = functions.listExecutions( functionId = "", queries = listOf(), // (optional) total = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/graphql/mutation.md b/docs/examples/kotlin/graphql/mutation.md index c95aaca2..0cdb78e6 100644 --- a/docs/examples/kotlin/graphql/mutation.md +++ b/docs/examples/kotlin/graphql/mutation.md @@ -11,4 +11,5 @@ val graphql = Graphql(client) val result = graphql.mutation( query = mapOf( "a" to "b" ), -)``` +) +``` diff --git a/docs/examples/kotlin/graphql/query.md b/docs/examples/kotlin/graphql/query.md index 24e2f587..3359822a 100644 --- a/docs/examples/kotlin/graphql/query.md +++ b/docs/examples/kotlin/graphql/query.md @@ -11,4 +11,5 @@ val graphql = Graphql(client) val result = graphql.query( query = mapOf( "a" to "b" ), -)``` +) +``` diff --git a/docs/examples/kotlin/messaging/create-subscriber.md b/docs/examples/kotlin/messaging/create-subscriber.md index 97dc3f62..09c28349 100644 --- a/docs/examples/kotlin/messaging/create-subscriber.md +++ b/docs/examples/kotlin/messaging/create-subscriber.md @@ -13,4 +13,5 @@ val result = messaging.createSubscriber( topicId = "", subscriberId = "", targetId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/messaging/delete-subscriber.md b/docs/examples/kotlin/messaging/delete-subscriber.md index ffa27b8a..7247e129 100644 --- a/docs/examples/kotlin/messaging/delete-subscriber.md +++ b/docs/examples/kotlin/messaging/delete-subscriber.md @@ -12,4 +12,5 @@ val messaging = Messaging(client) val result = messaging.deleteSubscriber( topicId = "", subscriberId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/storage/create-file.md b/docs/examples/kotlin/storage/create-file.md index ece44db5..df33a5a2 100644 --- a/docs/examples/kotlin/storage/create-file.md +++ b/docs/examples/kotlin/storage/create-file.md @@ -17,4 +17,5 @@ val result = storage.createFile( fileId = "", file = InputFile.fromPath("file.png"), permissions = listOf(Permission.read(Role.any())), // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/storage/delete-file.md b/docs/examples/kotlin/storage/delete-file.md index 6f498896..831ea2b2 100644 --- a/docs/examples/kotlin/storage/delete-file.md +++ b/docs/examples/kotlin/storage/delete-file.md @@ -12,4 +12,5 @@ val storage = Storage(client) val result = storage.deleteFile( bucketId = "", fileId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/storage/get-file-download.md b/docs/examples/kotlin/storage/get-file-download.md index 3895ab07..d60b5fa4 100644 --- a/docs/examples/kotlin/storage/get-file-download.md +++ b/docs/examples/kotlin/storage/get-file-download.md @@ -13,4 +13,5 @@ val result = storage.getFileDownload( bucketId = "", fileId = "", token = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/storage/get-file-preview.md b/docs/examples/kotlin/storage/get-file-preview.md index 6abf988b..2bb8cffd 100644 --- a/docs/examples/kotlin/storage/get-file-preview.md +++ b/docs/examples/kotlin/storage/get-file-preview.md @@ -26,4 +26,5 @@ val result = storage.getFilePreview( background = "", // (optional) output = ImageFormat.JPG, // (optional) token = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/storage/get-file-view.md b/docs/examples/kotlin/storage/get-file-view.md index d7adaf15..6e6e77f4 100644 --- a/docs/examples/kotlin/storage/get-file-view.md +++ b/docs/examples/kotlin/storage/get-file-view.md @@ -13,4 +13,5 @@ val result = storage.getFileView( bucketId = "", fileId = "", token = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/storage/get-file.md b/docs/examples/kotlin/storage/get-file.md index b5ab55a8..ac456abf 100644 --- a/docs/examples/kotlin/storage/get-file.md +++ b/docs/examples/kotlin/storage/get-file.md @@ -12,4 +12,5 @@ val storage = Storage(client) val result = storage.getFile( bucketId = "", fileId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/storage/list-files.md b/docs/examples/kotlin/storage/list-files.md index ee04acb0..7ad2ebee 100644 --- a/docs/examples/kotlin/storage/list-files.md +++ b/docs/examples/kotlin/storage/list-files.md @@ -14,4 +14,5 @@ val result = storage.listFiles( queries = listOf(), // (optional) search = "", // (optional) total = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/storage/update-file.md b/docs/examples/kotlin/storage/update-file.md index 23147c03..532c815b 100644 --- a/docs/examples/kotlin/storage/update-file.md +++ b/docs/examples/kotlin/storage/update-file.md @@ -16,4 +16,5 @@ val result = storage.updateFile( fileId = "", name = "", // (optional) permissions = listOf(Permission.read(Role.any())), // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/create-operations.md b/docs/examples/kotlin/tablesdb/create-operations.md index da84d33a..93c32c54 100644 --- a/docs/examples/kotlin/tablesdb/create-operations.md +++ b/docs/examples/kotlin/tablesdb/create-operations.md @@ -20,4 +20,5 @@ val result = tablesDB.createOperations( "name" to "Walter O'Brien" ) )), // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/create-row.md b/docs/examples/kotlin/tablesdb/create-row.md index c1ecee4a..e6e75051 100644 --- a/docs/examples/kotlin/tablesdb/create-row.md +++ b/docs/examples/kotlin/tablesdb/create-row.md @@ -24,4 +24,5 @@ val result = tablesDB.createRow( ), permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/create-transaction.md b/docs/examples/kotlin/tablesdb/create-transaction.md index 4b5148eb..dcf640c3 100644 --- a/docs/examples/kotlin/tablesdb/create-transaction.md +++ b/docs/examples/kotlin/tablesdb/create-transaction.md @@ -11,4 +11,5 @@ val tablesDB = TablesDB(client) val result = tablesDB.createTransaction( ttl = 60, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/decrement-row-column.md b/docs/examples/kotlin/tablesdb/decrement-row-column.md index e9c95ebd..848eea97 100644 --- a/docs/examples/kotlin/tablesdb/decrement-row-column.md +++ b/docs/examples/kotlin/tablesdb/decrement-row-column.md @@ -17,4 +17,5 @@ val result = tablesDB.decrementRowColumn( value = 0, // (optional) min = 0, // (optional) transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/delete-row.md b/docs/examples/kotlin/tablesdb/delete-row.md index 60796eb5..976a7f88 100644 --- a/docs/examples/kotlin/tablesdb/delete-row.md +++ b/docs/examples/kotlin/tablesdb/delete-row.md @@ -14,4 +14,5 @@ val result = tablesDB.deleteRow( tableId = "", rowId = "", transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/delete-transaction.md b/docs/examples/kotlin/tablesdb/delete-transaction.md index 8186037e..d3237744 100644 --- a/docs/examples/kotlin/tablesdb/delete-transaction.md +++ b/docs/examples/kotlin/tablesdb/delete-transaction.md @@ -11,4 +11,5 @@ val tablesDB = TablesDB(client) val result = tablesDB.deleteTransaction( transactionId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/get-row.md b/docs/examples/kotlin/tablesdb/get-row.md index 52d50523..e40856a3 100644 --- a/docs/examples/kotlin/tablesdb/get-row.md +++ b/docs/examples/kotlin/tablesdb/get-row.md @@ -15,4 +15,5 @@ val result = tablesDB.getRow( rowId = "", queries = listOf(), // (optional) transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/get-transaction.md b/docs/examples/kotlin/tablesdb/get-transaction.md index 94a4deb5..fd0e5ee6 100644 --- a/docs/examples/kotlin/tablesdb/get-transaction.md +++ b/docs/examples/kotlin/tablesdb/get-transaction.md @@ -11,4 +11,5 @@ val tablesDB = TablesDB(client) val result = tablesDB.getTransaction( transactionId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/increment-row-column.md b/docs/examples/kotlin/tablesdb/increment-row-column.md index 7820d260..85c03791 100644 --- a/docs/examples/kotlin/tablesdb/increment-row-column.md +++ b/docs/examples/kotlin/tablesdb/increment-row-column.md @@ -17,4 +17,5 @@ val result = tablesDB.incrementRowColumn( value = 0, // (optional) max = 0, // (optional) transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/list-rows.md b/docs/examples/kotlin/tablesdb/list-rows.md index b6a54684..9957a86f 100644 --- a/docs/examples/kotlin/tablesdb/list-rows.md +++ b/docs/examples/kotlin/tablesdb/list-rows.md @@ -15,4 +15,5 @@ val result = tablesDB.listRows( queries = listOf(), // (optional) transactionId = "", // (optional) total = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/list-transactions.md b/docs/examples/kotlin/tablesdb/list-transactions.md index 44c824e7..03c9d5b4 100644 --- a/docs/examples/kotlin/tablesdb/list-transactions.md +++ b/docs/examples/kotlin/tablesdb/list-transactions.md @@ -11,4 +11,5 @@ val tablesDB = TablesDB(client) val result = tablesDB.listTransactions( queries = listOf(), // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/update-row.md b/docs/examples/kotlin/tablesdb/update-row.md index 01a8d8c1..fcba331b 100644 --- a/docs/examples/kotlin/tablesdb/update-row.md +++ b/docs/examples/kotlin/tablesdb/update-row.md @@ -24,4 +24,5 @@ val result = tablesDB.updateRow( ), // (optional) permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/update-transaction.md b/docs/examples/kotlin/tablesdb/update-transaction.md index 98c0b816..4843e5b7 100644 --- a/docs/examples/kotlin/tablesdb/update-transaction.md +++ b/docs/examples/kotlin/tablesdb/update-transaction.md @@ -13,4 +13,5 @@ val result = tablesDB.updateTransaction( transactionId = "", commit = false, // (optional) rollback = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/tablesdb/upsert-row.md b/docs/examples/kotlin/tablesdb/upsert-row.md index aa3862d4..d0b52793 100644 --- a/docs/examples/kotlin/tablesdb/upsert-row.md +++ b/docs/examples/kotlin/tablesdb/upsert-row.md @@ -24,4 +24,5 @@ val result = tablesDB.upsertRow( ), // (optional) permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/teams/create-membership.md b/docs/examples/kotlin/teams/create-membership.md index 5adfe4ea..e5289e64 100644 --- a/docs/examples/kotlin/teams/create-membership.md +++ b/docs/examples/kotlin/teams/create-membership.md @@ -17,4 +17,5 @@ val result = teams.createMembership( phone = "+12065550100", // (optional) url = "https://example.com", // (optional) name = "", // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/teams/create.md b/docs/examples/kotlin/teams/create.md index 3249279c..7b4bfcbc 100644 --- a/docs/examples/kotlin/teams/create.md +++ b/docs/examples/kotlin/teams/create.md @@ -13,4 +13,5 @@ val result = teams.create( teamId = "", name = "", roles = listOf(), // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/teams/delete-membership.md b/docs/examples/kotlin/teams/delete-membership.md index 731e954f..4c1cebea 100644 --- a/docs/examples/kotlin/teams/delete-membership.md +++ b/docs/examples/kotlin/teams/delete-membership.md @@ -12,4 +12,5 @@ val teams = Teams(client) val result = teams.deleteMembership( teamId = "", membershipId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/teams/delete.md b/docs/examples/kotlin/teams/delete.md index 614ebf11..03f319f8 100644 --- a/docs/examples/kotlin/teams/delete.md +++ b/docs/examples/kotlin/teams/delete.md @@ -11,4 +11,5 @@ val teams = Teams(client) val result = teams.delete( teamId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/teams/get-membership.md b/docs/examples/kotlin/teams/get-membership.md index bee60e9e..cc85d6fb 100644 --- a/docs/examples/kotlin/teams/get-membership.md +++ b/docs/examples/kotlin/teams/get-membership.md @@ -12,4 +12,5 @@ val teams = Teams(client) val result = teams.getMembership( teamId = "", membershipId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/teams/get-prefs.md b/docs/examples/kotlin/teams/get-prefs.md index 4f01527b..3fa7fb3f 100644 --- a/docs/examples/kotlin/teams/get-prefs.md +++ b/docs/examples/kotlin/teams/get-prefs.md @@ -11,4 +11,5 @@ val teams = Teams(client) val result = teams.getPrefs( teamId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/teams/get.md b/docs/examples/kotlin/teams/get.md index 7248a02a..a01167ca 100644 --- a/docs/examples/kotlin/teams/get.md +++ b/docs/examples/kotlin/teams/get.md @@ -11,4 +11,5 @@ val teams = Teams(client) val result = teams.get( teamId = "", -)``` +) +``` diff --git a/docs/examples/kotlin/teams/list-memberships.md b/docs/examples/kotlin/teams/list-memberships.md index 928f0dd7..43819424 100644 --- a/docs/examples/kotlin/teams/list-memberships.md +++ b/docs/examples/kotlin/teams/list-memberships.md @@ -14,4 +14,5 @@ val result = teams.listMemberships( queries = listOf(), // (optional) search = "", // (optional) total = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/teams/list.md b/docs/examples/kotlin/teams/list.md index 66c98cdc..d38ba474 100644 --- a/docs/examples/kotlin/teams/list.md +++ b/docs/examples/kotlin/teams/list.md @@ -13,4 +13,5 @@ val result = teams.list( queries = listOf(), // (optional) search = "", // (optional) total = false, // (optional) -)``` +) +``` diff --git a/docs/examples/kotlin/teams/update-membership-status.md b/docs/examples/kotlin/teams/update-membership-status.md index 53a3b264..cc4fb2fb 100644 --- a/docs/examples/kotlin/teams/update-membership-status.md +++ b/docs/examples/kotlin/teams/update-membership-status.md @@ -14,4 +14,5 @@ val result = teams.updateMembershipStatus( membershipId = "", userId = "", secret = "", -)``` +) +``` diff --git a/docs/examples/kotlin/teams/update-membership.md b/docs/examples/kotlin/teams/update-membership.md index 1c8b236a..6e721d4e 100644 --- a/docs/examples/kotlin/teams/update-membership.md +++ b/docs/examples/kotlin/teams/update-membership.md @@ -13,4 +13,5 @@ val result = teams.updateMembership( teamId = "", membershipId = "", roles = listOf(), -)``` +) +``` diff --git a/docs/examples/kotlin/teams/update-name.md b/docs/examples/kotlin/teams/update-name.md index 760a3b49..0248d246 100644 --- a/docs/examples/kotlin/teams/update-name.md +++ b/docs/examples/kotlin/teams/update-name.md @@ -12,4 +12,5 @@ val teams = Teams(client) val result = teams.updateName( teamId = "", name = "", -)``` +) +``` diff --git a/docs/examples/kotlin/teams/update-prefs.md b/docs/examples/kotlin/teams/update-prefs.md index 854cb2b6..fd6e44eb 100644 --- a/docs/examples/kotlin/teams/update-prefs.md +++ b/docs/examples/kotlin/teams/update-prefs.md @@ -12,4 +12,5 @@ val teams = Teams(client) val result = teams.updatePrefs( teamId = "", prefs = mapOf( "a" to "b" ), -)``` +) +``` diff --git a/library/src/main/java/io/appwrite/Channel.kt b/library/src/main/java/io/appwrite/Channel.kt index f358c721..bfe4073e 100644 --- a/library/src/main/java/io/appwrite/Channel.kt +++ b/library/src/main/java/io/appwrite/Channel.kt @@ -37,8 +37,12 @@ class Channel private constructor( * Internal helper to transition to next state with segment and ID * Public for extension function access */ - fun next(segment: String, id: String = "*"): Channel { - return Channel(segments + listOf(segment, normalize(id))) + fun next(segment: String, id: String? = null): Channel { + return if (id == null) { + Channel(segments + segment) + } else { + Channel(segments + listOf(segment, normalize(id))) + } } /** @@ -64,6 +68,9 @@ class Channel private constructor( fun bucket(id: String = "*"): Channel<_Bucket> = Channel(listOf("buckets", normalize(id))) + fun execution(id: String = "*"): Channel<_Execution> = + Channel(listOf("executions", normalize(id))) + fun function(id: String = "*"): Channel<_Func> = Channel(listOf("functions", normalize(id))) @@ -73,10 +80,7 @@ class Channel private constructor( fun membership(id: String = "*"): Channel<_Membership> = Channel(listOf("memberships", normalize(id))) - fun account(userId: String = ""): String { - val id = normalize(userId) - return if (id == "*") "account" else "account.$id" - } + fun account(): String = "account" // Global events fun documents(): String = "documents" @@ -93,13 +97,13 @@ class Channel private constructor( /** * Only available on Channel<_Database> */ -fun Channel<_Database>.collection(id: String = "*"): Channel<_Collection> = - this.next("collections", id) +fun Channel<_Database>.collection(id: String? = null): Channel<_Collection> = + this.next("collections", id ?: "*") /** * Only available on Channel<_Collection> */ -fun Channel<_Collection>.document(id: String = "*"): Channel<_Document> = +fun Channel<_Collection>.document(id: String? = null): Channel<_Document> = this.next("documents", id) // --- TABLESDB ROUTE --- @@ -107,13 +111,13 @@ fun Channel<_Collection>.document(id: String = "*"): Channel<_Document> = /** * Only available on Channel<_TablesDB> */ -fun Channel<_TablesDB>.table(id: String = "*"): Channel<_Table> = - this.next("tables", id) +fun Channel<_TablesDB>.table(id: String? = null): Channel<_Table> = + this.next("tables", id ?: "*") /** * Only available on Channel<_Table> */ -fun Channel<_Table>.row(id: String = "*"): Channel<_Row> = +fun Channel<_Table>.row(id: String? = null): Channel<_Row> = this.next("rows", id) // --- BUCKET ROUTE --- @@ -121,19 +125,11 @@ fun Channel<_Table>.row(id: String = "*"): Channel<_Row> = /** * Only available on Channel<_Bucket> */ -fun Channel<_Bucket>.file(id: String = "*"): Channel<_File> = +fun Channel<_Bucket>.file(id: String? = null): Channel<_File> = this.next("files", id) -// --- FUNCTION ROUTE --- - -/** - * Only available on Channel<_Func> - */ -fun Channel<_Func>.execution(id: String = "*"): Channel<_Execution> = - this.next("executions", id) - // --- TERMINAL ACTIONS --- -// Restricted to Actionable types (_Document, _Row, _File, _Execution, _Team, _Membership) +// Restricted to Actionable types (_Document, _Row, _File, _Team, _Membership) /** * Only available on Channel<_Document> @@ -198,27 +194,6 @@ fun Channel<_File>.update(): Channel<_Resolved> = fun Channel<_File>.delete(): Channel<_Resolved> = this.resolve("delete") -/** - * Only available on Channel<_Execution> - */ -@JvmName("createExecution") -fun Channel<_Execution>.create(): Channel<_Resolved> = - this.resolve("create") - -/** - * Only available on Channel<_Execution> - */ -@JvmName("updateExecution") -fun Channel<_Execution>.update(): Channel<_Resolved> = - this.resolve("update") - -/** - * Only available on Channel<_Execution> - */ -@JvmName("deleteExecution") -fun Channel<_Execution>.delete(): Channel<_Resolved> = - this.resolve("delete") - /** * Only available on Channel<_Team> */ diff --git a/library/src/main/java/io/appwrite/enums/OAuthProvider.kt b/library/src/main/java/io/appwrite/enums/OAuthProvider.kt index 955df300..443a05c4 100644 --- a/library/src/main/java/io/appwrite/enums/OAuthProvider.kt +++ b/library/src/main/java/io/appwrite/enums/OAuthProvider.kt @@ -80,7 +80,11 @@ enum class OAuthProvider(val value: String) { @SerializedName("zoho") ZOHO("zoho"), @SerializedName("zoom") - ZOOM("zoom"); + ZOOM("zoom"), + @SerializedName("githubImagine") + GITHUBIMAGINE("githubImagine"), + @SerializedName("googleImagine") + GOOGLEIMAGINE("googleImagine"); override fun toString() = value } \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/services/Account.kt b/library/src/main/java/io/appwrite/services/Account.kt index 85914232..6d22a45b 100644 --- a/library/src/main/java/io/appwrite/services/Account.kt +++ b/library/src/main/java/io/appwrite/services/Account.kt @@ -1456,7 +1456,7 @@ class Account(client: Client) : Service(client) { * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * - * @param 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 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, githubImagine, googleImagine. * @param success URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param failure URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param scopes A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. @@ -1924,7 +1924,7 @@ class Account(client: Client) : Service(client) { * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * - * @param 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 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, githubImagine, googleImagine. * @param success URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param failure URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param scopes A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.