Skip to content

Commit f562577

Browse files
committed
chore: regenerate sdks
1 parent 851d43f commit f562577

File tree

18 files changed

+46
-31
lines changed

18 files changed

+46
-31
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ repositories {
3838
Next, add the dependency to your project's `build.gradle(.kts)` file:
3939

4040
```groovy
41-
implementation("io.appwrite:sdk-for-android:10.1.0")
41+
implementation("io.appwrite:sdk-for-android:10.2.0")
4242
```
4343

4444
### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
4949
<dependency>
5050
<groupId>io.appwrite</groupId>
5151
<artifactId>sdk-for-android</artifactId>
52-
<version>10.1.0</version>
52+
<version>10.2.0</version>
5353
</dependency>
5454
</dependencies>
5555
```

library/src/main/java/io/appwrite/Client.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class Client @JvmOverloads constructor(
8787
"x-sdk-name" to "Android",
8888
"x-sdk-platform" to "client",
8989
"x-sdk-language" to "android",
90-
"x-sdk-version" to "10.1.0",
90+
"x-sdk-version" to "10.2.0",
9191
"x-appwrite-response-format" to "1.8.0"
9292
)
9393
config = mutableMapOf()

library/src/main/java/io/appwrite/Query.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,6 @@ class Query(
151151
*/
152152
fun orderDesc(attribute: String) = Query("orderDesc", attribute).toJson()
153153

154-
/**
155-
* Sort results randomly.
156-
*
157-
* @returns The query string.
158-
*/
159-
fun orderRandom() = Query("orderRandom").toJson()
160-
161154
/**
162155
* Return results before documentId.
163156
*
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+
}

library/src/main/java/io/appwrite/models/Execution.kt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package io.appwrite.models
22

33
import com.google.gson.annotations.SerializedName
44
import io.appwrite.extensions.jsonCast
5+
import io.appwrite.enums.ExecutionTrigger
6+
import io.appwrite.enums.ExecutionStatus
57

68
/**
79
* Execution
@@ -47,13 +49,13 @@ data class Execution(
4749
* The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.
4850
*/
4951
@SerializedName("trigger")
50-
val trigger: String,
52+
val trigger: ExecutionTrigger,
5153

5254
/**
5355
* The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.
5456
*/
5557
@SerializedName("status")
56-
val status: String,
58+
val status: ExecutionStatus,
5759

5860
/**
5961
* HTTP request method type.
@@ -123,8 +125,8 @@ data class Execution(
123125
"\$permissions" to permissions as Any,
124126
"functionId" to functionId as Any,
125127
"deploymentId" to deploymentId as Any,
126-
"trigger" to trigger as Any,
127-
"status" to status as Any,
128+
"trigger" to trigger.value as Any,
129+
"status" to status.value as Any,
128130
"requestMethod" to requestMethod as Any,
129131
"requestPath" to requestPath as Any,
130132
"requestHeaders" to requestHeaders.map { it.toMap() } as Any,
@@ -149,8 +151,8 @@ data class Execution(
149151
permissions = map["\$permissions"] as List<String>,
150152
functionId = map["functionId"] as String,
151153
deploymentId = map["deploymentId"] as String,
152-
trigger = map["trigger"] as String,
153-
status = map["status"] as String,
154+
trigger = ExecutionTrigger.values().find { it.value == map["trigger"] as String }!!,
155+
status = ExecutionStatus.values().find { it.value == map["status"] as String }!!,
154156
requestMethod = map["requestMethod"] as String,
155157
requestPath = map["requestPath"] as String,
156158
requestHeaders = (map["requestHeaders"] as List<Map<String, Any>>).map { Headers.from(map = it) },
@@ -160,7 +162,7 @@ data class Execution(
160162
logs = map["logs"] as String,
161163
errors = map["errors"] as String,
162164
duration = (map["duration"] as Number).toDouble(),
163-
scheduledAt = map["scheduledAt"] as? String?,
165+
scheduledAt = map["scheduledAt"] as? String,
164166
)
165167
}
166168
}

library/src/main/java/io/appwrite/models/Target.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ data class Target(
8585
updatedAt = map["\$updatedAt"] as String,
8686
name = map["name"] as String,
8787
userId = map["userId"] as String,
88-
providerId = map["providerId"] as? String?,
88+
providerId = map["providerId"] as? String,
8989
providerType = map["providerType"] as String,
9090
identifier = map["identifier"] as String,
9191
expired = map["expired"] as Boolean,

library/src/main/java/io/appwrite/models/User.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ data class User<T>(
196196
createdAt = map["\$createdAt"] as String,
197197
updatedAt = map["\$updatedAt"] as String,
198198
name = map["name"] as String,
199-
password = map["password"] as? String?,
200-
hash = map["hash"] as? String?,
201-
hashOptions = map["hashOptions"] as? Any?,
199+
password = map["password"] as? String,
200+
hash = map["hash"] as? String,
201+
hashOptions = map["hashOptions"] as? Any,
202202
registration = map["registration"] as String,
203203
status = map["status"] as Boolean,
204204
labels = map["labels"] as List<String>,

library/src/main/java/io/appwrite/services/Account.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import android.net.Uri
44
import io.appwrite.Client
55
import io.appwrite.Service
66
import io.appwrite.models.*
7-
import io.appwrite.enums.*
87
import io.appwrite.exceptions.AppwriteException
98
import io.appwrite.extensions.classOf
109
import io.appwrite.WebAuthComponent

library/src/main/java/io/appwrite/services/Avatars.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import android.net.Uri
44
import io.appwrite.Client
55
import io.appwrite.Service
66
import io.appwrite.models.*
7-
import io.appwrite.enums.*
87
import io.appwrite.exceptions.AppwriteException
98
import io.appwrite.extensions.classOf
109
import okhttp3.Cookie

0 commit comments

Comments
 (0)