Skip to content

Commit 7e749d7

Browse files
authored
Merge pull request #57 from appwrite/dev
feat: Kotlin SDK update for version 12.0.0
2 parents 0a99330 + aa6d3ba commit 7e749d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+361
-169
lines changed

README.md

Lines changed: 2 additions & 2 deletions
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:11.1.0")
42+
implementation("io.appwrite:sdk-for-kotlin:12.0.0")
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>11.1.0</version>
53+
<version>12.0.0</version>
5454
</dependency>
5555
</dependencies>
5656
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class Client @JvmOverloads constructor(
5858
init {
5959
headers = mutableMapOf(
6060
"content-type" to "application/json",
61-
"user-agent" to "AppwriteKotlinSDK/11.1.0 ${System.getProperty("http.agent")}",
61+
"user-agent" to "AppwriteKotlinSDK/12.0.0 ${System.getProperty("http.agent")}",
6262
"x-sdk-name" to "Kotlin",
6363
"x-sdk-platform" to "server",
6464
"x-sdk-language" to "kotlin",
65-
"x-sdk-version" to "11.1.0",
65+
"x-sdk-version" to "12.0.0",
6666
"x-appwrite-response-format" to "1.8.0",
6767
)
6868

@@ -617,7 +617,7 @@ class Client @JvmOverloads constructor(
617617
val warnings = response.headers["x-appwrite-warning"]
618618
if (warnings != null) {
619619
warnings.split(";").forEach { warning ->
620-
println("Warning: $warning")
620+
System.err.println("Warning: $warning")
621621
}
622622
}
623623

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package io.appwrite.enums
2+
3+
import com.google.gson.annotations.SerializedName
4+
5+
enum class AttributeStatus(val value: String) {
6+
@SerializedName("available")
7+
AVAILABLE("available"),
8+
@SerializedName("processing")
9+
PROCESSING("processing"),
10+
@SerializedName("deleting")
11+
DELETING("deleting"),
12+
@SerializedName("stuck")
13+
STUCK("stuck"),
14+
@SerializedName("failed")
15+
FAILED("failed");
16+
17+
override fun toString() = value
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package io.appwrite.enums
2+
3+
import com.google.gson.annotations.SerializedName
4+
5+
enum class ColumnStatus(val value: String) {
6+
@SerializedName("available")
7+
AVAILABLE("available"),
8+
@SerializedName("processing")
9+
PROCESSING("processing"),
10+
@SerializedName("deleting")
11+
DELETING("deleting"),
12+
@SerializedName("stuck")
13+
STUCK("stuck"),
14+
@SerializedName("failed")
15+
FAILED("failed");
16+
17+
override fun toString() = value
18+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package io.appwrite.enums
2+
3+
import com.google.gson.annotations.SerializedName
4+
5+
enum class DatabaseType(val value: String) {
6+
@SerializedName("legacy")
7+
LEGACY("legacy"),
8+
@SerializedName("tablesdb")
9+
TABLESDB("tablesdb");
10+
11+
override fun toString() = value
12+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package io.appwrite.enums
2+
3+
import com.google.gson.annotations.SerializedName
4+
5+
enum class DeploymentStatus(val value: String) {
6+
@SerializedName("waiting")
7+
WAITING("waiting"),
8+
@SerializedName("processing")
9+
PROCESSING("processing"),
10+
@SerializedName("building")
11+
BUILDING("building"),
12+
@SerializedName("ready")
13+
READY("ready"),
14+
@SerializedName("failed")
15+
FAILED("failed");
16+
17+
override fun toString() = value
18+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package io.appwrite.enums
2+
3+
import com.google.gson.annotations.SerializedName
4+
5+
enum class ExecutionStatus(val value: String) {
6+
@SerializedName("waiting")
7+
WAITING("waiting"),
8+
@SerializedName("processing")
9+
PROCESSING("processing"),
10+
@SerializedName("completed")
11+
COMPLETED("completed"),
12+
@SerializedName("failed")
13+
FAILED("failed");
14+
15+
override fun toString() = value
16+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package io.appwrite.enums
2+
3+
import com.google.gson.annotations.SerializedName
4+
5+
enum class ExecutionTrigger(val value: String) {
6+
@SerializedName("http")
7+
HTTP("http"),
8+
@SerializedName("schedule")
9+
SCHEDULE("schedule"),
10+
@SerializedName("event")
11+
EVENT("event");
12+
13+
override fun toString() = value
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package io.appwrite.enums
2+
3+
import com.google.gson.annotations.SerializedName
4+
5+
enum class HealthAntivirusStatus(val value: String) {
6+
@SerializedName("disabled")
7+
DISABLED("disabled"),
8+
@SerializedName("offline")
9+
OFFLINE("offline"),
10+
@SerializedName("online")
11+
ONLINE("online");
12+
13+
override fun toString() = value
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package io.appwrite.enums
2+
3+
import com.google.gson.annotations.SerializedName
4+
5+
enum class HealthCheckStatus(val value: String) {
6+
@SerializedName("pass")
7+
PASS("pass"),
8+
@SerializedName("fail")
9+
FAIL("fail");
10+
11+
override fun toString() = value
12+
}

0 commit comments

Comments
 (0)