Skip to content

Commit 83caa55

Browse files
committed
Release candidate for 1.5.x
1 parent 0764928 commit 83caa55

16 files changed

+34
-34
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ repositories {
3939
Next, add the dependency to your project's `build.gradle(.kts)` file:
4040

4141
```groovy
42-
implementation("io.appwrite:sdk-for-kotlin:5.0.0-rc.2")
42+
implementation("io.appwrite:sdk-for-kotlin:5.0.0-rc.3")
4343
```
4444

4545
### Maven
@@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file:
5050
<dependency>
5151
<groupId>io.appwrite</groupId>
5252
<artifactId>sdk-for-kotlin</artifactId>
53-
<version>5.0.0-rc.2</version>
53+
<version>5.0.0-rc.3</version>
5454
</dependency>
5555
</dependencies>
5656
```

docs/examples/java/account/add-authenticator.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import io.appwrite.Client;
22
import io.appwrite.coroutines.CoroutineCallback;
33
import io.appwrite.services.Account;
4-
import io.appwrite.enums.Type;
4+
import io.appwrite.enums.AuthenticatorType;
55

66
Client client = new Client()
77
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -11,7 +11,7 @@ Client client = new Client()
1111
Account account = new Account(client);
1212

1313
account.addAuthenticator(
14-
.TOTP
14+
AuthenticatorType.TOTP
1515
new CoroutineCallback<>((result, error) -> {
1616
if (error != null) {
1717
error.printStackTrace();

docs/examples/java/account/create2f-a-challenge.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import io.appwrite.Client;
22
import io.appwrite.coroutines.CoroutineCallback;
33
import io.appwrite.services.Account;
4-
import io.appwrite.enums.Factor;
4+
import io.appwrite.enums.AuthenticationFactor;
55

66
Client client = new Client()
77
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -10,7 +10,7 @@ Client client = new Client()
1010
Account account = new Account(client);
1111

1212
account.create2FAChallenge(
13-
.TOTP
13+
AuthenticationFactor.TOTP
1414
new CoroutineCallback<>((result, error) -> {
1515
if (error != null) {
1616
error.printStackTrace();

docs/examples/java/account/delete-authenticator.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import io.appwrite.Client;
22
import io.appwrite.coroutines.CoroutineCallback;
33
import io.appwrite.services.Account;
4-
import io.appwrite.enums.Type;
4+
import io.appwrite.enums.AuthenticatorType;
55

66
Client client = new Client()
77
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -11,7 +11,7 @@ Client client = new Client()
1111
Account account = new Account(client);
1212

1313
account.deleteAuthenticator(
14-
.TOTP,
14+
AuthenticatorType.TOTP,
1515
"[OTP]"
1616
new CoroutineCallback<>((result, error) -> {
1717
if (error != null) {

docs/examples/java/account/verify-authenticator.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import io.appwrite.Client;
22
import io.appwrite.coroutines.CoroutineCallback;
33
import io.appwrite.services.Account;
4-
import io.appwrite.enums.Type;
4+
import io.appwrite.enums.AuthenticatorType;
55

66
Client client = new Client()
77
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -11,7 +11,7 @@ Client client = new Client()
1111
Account account = new Account(client);
1212

1313
account.verifyAuthenticator(
14-
.TOTP,
14+
AuthenticatorType.TOTP,
1515
"[OTP]"
1616
new CoroutineCallback<>((result, error) -> {
1717
if (error != null) {

docs/examples/java/users/delete-authenticator.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import io.appwrite.Client;
22
import io.appwrite.coroutines.CoroutineCallback;
33
import io.appwrite.services.Users;
4-
import io.appwrite.enums.Type;
4+
import io.appwrite.enums.AuthenticatorType;
55

66
Client client = new Client()
77
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -12,7 +12,7 @@ Users users = new Users(client);
1212

1313
users.deleteAuthenticator(
1414
"[USER_ID]",
15-
.TOTP,
15+
AuthenticatorType.TOTP,
1616
"[OTP]"
1717
new CoroutineCallback<>((result, error) -> {
1818
if (error != null) {
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import io.appwrite.Client
22
import io.appwrite.coroutines.CoroutineCallback
33
import io.appwrite.services.Account
4-
import io.appwrite.enums.Type
4+
import io.appwrite.enums.AuthenticatorType
55

66
val client = Client()
77
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -11,5 +11,5 @@ val client = Client()
1111
val account = Account(client)
1212

1313
val response = account.addAuthenticator(
14-
type = .TOTP
14+
type = AuthenticatorType.TOTP
1515
)
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import io.appwrite.Client
22
import io.appwrite.coroutines.CoroutineCallback
33
import io.appwrite.services.Account
4-
import io.appwrite.enums.Factor
4+
import io.appwrite.enums.AuthenticationFactor
55

66
val client = Client()
77
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -10,5 +10,5 @@ val client = Client()
1010
val account = Account(client)
1111

1212
val response = account.create2FAChallenge(
13-
factor = .TOTP
13+
factor = AuthenticationFactor.TOTP
1414
)
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import io.appwrite.Client
22
import io.appwrite.coroutines.CoroutineCallback
33
import io.appwrite.services.Account
4-
import io.appwrite.enums.Type
4+
import io.appwrite.enums.AuthenticatorType
55

66
val client = Client()
77
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -11,6 +11,6 @@ val client = Client()
1111
val account = Account(client)
1212

1313
val response = account.deleteAuthenticator(
14-
type = .TOTP,
14+
type = AuthenticatorType.TOTP,
1515
otp = "[OTP]"
1616
)
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import io.appwrite.Client
22
import io.appwrite.coroutines.CoroutineCallback
33
import io.appwrite.services.Account
4-
import io.appwrite.enums.Type
4+
import io.appwrite.enums.AuthenticatorType
55

66
val client = Client()
77
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -11,6 +11,6 @@ val client = Client()
1111
val account = Account(client)
1212

1313
val response = account.verifyAuthenticator(
14-
type = .TOTP,
14+
type = AuthenticatorType.TOTP,
1515
otp = "[OTP]"
1616
)

docs/examples/kotlin/users/delete-authenticator.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import io.appwrite.Client
22
import io.appwrite.coroutines.CoroutineCallback
33
import io.appwrite.services.Users
4-
import io.appwrite.enums.Type
4+
import io.appwrite.enums.AuthenticatorType
55

66
val client = Client()
77
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -12,6 +12,6 @@ val users = Users(client)
1212

1313
val response = users.deleteAuthenticator(
1414
userId = "[USER_ID]",
15-
type = .TOTP,
15+
type = AuthenticatorType.TOTP,
1616
otp = "[OTP]"
1717
)

src/main/kotlin/io/appwrite/Client.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ class Client @JvmOverloads constructor(
5555
init {
5656
headers = mutableMapOf(
5757
"content-type" to "application/json",
58-
"user-agent" to "AppwriteKotlinSDK/5.0.0-rc.2 ${System.getProperty("http.agent")}",
58+
"user-agent" to "AppwriteKotlinSDK/5.0.0-rc.3 ${System.getProperty("http.agent")}",
5959
"x-sdk-name" to "Kotlin",
6060
"x-sdk-platform" to "server",
6161
"x-sdk-language" to "kotlin",
62-
"x-sdk-version" to "5.0.0-rc.2", "x-appwrite-response-format" to "1.4.0"
62+
"x-sdk-version" to "5.0.0-rc.3", "x-appwrite-response-format" to "1.5.0"
6363
)
6464
config = mutableMapOf()
6565

src/main/kotlin/io/appwrite/enums/Factor.kt src/main/kotlin/io/appwrite/enums/AuthenticationFactor.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.appwrite.enums
22

3-
enum class Factor(val value: String) {
3+
enum class AuthenticationFactor(val value: String) {
44
TOTP("totp"),
55
PHONE("phone"),
66
EMAIL("email");

src/main/kotlin/io/appwrite/enums/Type.kt src/main/kotlin/io/appwrite/enums/AuthenticatorType.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.appwrite.enums
22

3-
enum class Type(val value: String) {
3+
enum class AuthenticatorType(val value: String) {
44
TOTP("totp");
55

66
override fun toString() = value

src/main/kotlin/io/appwrite/services/Account.kt

+6-6
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ class Account(client: Client) : Service(client) {
370370
*/
371371
@Throws(AppwriteException::class)
372372
suspend fun create2FAChallenge(
373-
factor: Factor,
373+
factor: AuthenticationFactor,
374374
): io.appwrite.models.MfaChallenge {
375375
val apiPath = "/account/mfa/challenge"
376376

@@ -465,7 +465,7 @@ class Account(client: Client) : Service(client) {
465465
*/
466466
@Throws(AppwriteException::class)
467467
suspend fun addAuthenticator(
468-
type: Type,
468+
type: AuthenticatorType,
469469
): io.appwrite.models.MfaType {
470470
val apiPath = "/account/mfa/{type}"
471471
.replace("{type}", type.value)
@@ -499,7 +499,7 @@ class Account(client: Client) : Service(client) {
499499
*/
500500
@Throws(AppwriteException::class)
501501
suspend fun <T> verifyAuthenticator(
502-
type: Type,
502+
type: AuthenticatorType,
503503
otp: String,
504504
nestedType: Class<T>,
505505
): io.appwrite.models.User<T> {
@@ -536,7 +536,7 @@ class Account(client: Client) : Service(client) {
536536
*/
537537
@Throws(AppwriteException::class)
538538
suspend fun verifyAuthenticator(
539-
type: Type,
539+
type: AuthenticatorType,
540540
otp: String,
541541
): io.appwrite.models.User<Map<String, Any>> = verifyAuthenticator(
542542
type,
@@ -555,7 +555,7 @@ class Account(client: Client) : Service(client) {
555555
*/
556556
@Throws(AppwriteException::class)
557557
suspend fun <T> deleteAuthenticator(
558-
type: Type,
558+
type: AuthenticatorType,
559559
otp: String,
560560
nestedType: Class<T>,
561561
): io.appwrite.models.User<T> {
@@ -592,7 +592,7 @@ class Account(client: Client) : Service(client) {
592592
*/
593593
@Throws(AppwriteException::class)
594594
suspend fun deleteAuthenticator(
595-
type: Type,
595+
type: AuthenticatorType,
596596
otp: String,
597597
): io.appwrite.models.User<Map<String, Any>> = deleteAuthenticator(
598598
type,

src/main/kotlin/io/appwrite/services/Users.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ class Users(client: Client) : Service(client) {
11201120
@Throws(AppwriteException::class)
11211121
suspend fun <T> deleteAuthenticator(
11221122
userId: String,
1123-
type: Type,
1123+
type: AuthenticatorType,
11241124
otp: String,
11251125
nestedType: Class<T>,
11261126
): io.appwrite.models.User<T> {
@@ -1160,7 +1160,7 @@ class Users(client: Client) : Service(client) {
11601160
@Throws(AppwriteException::class)
11611161
suspend fun deleteAuthenticator(
11621162
userId: String,
1163-
type: Type,
1163+
type: AuthenticatorType,
11641164
otp: String,
11651165
): io.appwrite.models.User<Map<String, Any>> = deleteAuthenticator(
11661166
userId,

0 commit comments

Comments
 (0)