Skip to content

Commit 63f3795

Browse files
committed
Add serialized names to fix deserializing with realtime payloadType
1 parent 7c78fa5 commit 63f3795

31 files changed

+201
-4
lines changed

README.md

Lines changed: 3 additions & 3 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:0.3.2")
41+
implementation("io.appwrite:sdk-for-android:0.3.3")
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>0.3.2</version>
52+
<version>0.3.3</version>
5353
</dependency>
5454
</dependencies>
5555
```
@@ -158,4 +158,4 @@ This library is auto-generated by Appwrite custom [SDK Generator](https://github
158158

159159
## License
160160

161-
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
161+
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'io.github.gradle-nexus.publish-plugin'
33
// Top-level build file where you can add configuration options common to all sub-projects/modules.
44
buildscript {
55
ext.kotlin_version = "1.5.31"
6-
version "0.3.2"
6+
version "0.3.3"
77
repositories {
88
maven { url "https://plugins.gradle.org/m2/" }
99
google()

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.appwrite.models
22

3+
import com.google.gson.annotations.SerializedName
4+
35
/**
46
* Continent
57
*/
@@ -8,12 +10,14 @@ data class Continent(
810
* Continent name.
911
*
1012
*/
13+
@SerializedName("name")
1114
val name: String,
1215

1316
/**
1417
* Continent two letter code.
1518
*
1619
*/
20+
@SerializedName("code")
1721
val code: String
1822
) {
1923
companion object {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.appwrite.models
22

3+
import com.google.gson.annotations.SerializedName
4+
35
/**
46
* Continents List
57
*/
@@ -8,12 +10,14 @@ data class ContinentList(
810
* Total number of items available on the server.
911
*
1012
*/
13+
@SerializedName("sum")
1114
val sum: Long,
1215

1316
/**
1417
* List of continents.
1518
*
1619
*/
20+
@SerializedName("continents")
1721
val continents: List<Continent>
1822
) {
1923
companion object {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.appwrite.models
22

3+
import com.google.gson.annotations.SerializedName
4+
35
/**
46
* Country
57
*/
@@ -8,12 +10,14 @@ data class Country(
810
* Country name.
911
*
1012
*/
13+
@SerializedName("name")
1114
val name: String,
1215

1316
/**
1417
* Country two-character ISO 3166-1 alpha code.
1518
*
1619
*/
20+
@SerializedName("code")
1721
val code: String
1822
) {
1923
companion object {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.appwrite.models
22

3+
import com.google.gson.annotations.SerializedName
4+
35
/**
46
* Countries List
57
*/
@@ -8,12 +10,14 @@ data class CountryList(
810
* Total number of items available on the server.
911
*
1012
*/
13+
@SerializedName("sum")
1114
val sum: Long,
1215

1316
/**
1417
* List of countries.
1518
*
1619
*/
20+
@SerializedName("countries")
1721
val countries: List<Country>
1822
) {
1923
companion object {

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.appwrite.models
22

3+
import com.google.gson.annotations.SerializedName
4+
35
/**
46
* Currency
57
*/
@@ -8,42 +10,49 @@ data class Currency(
810
* Currency symbol.
911
*
1012
*/
13+
@SerializedName("symbol")
1114
val symbol: String,
1215

1316
/**
1417
* Currency name.
1518
*
1619
*/
20+
@SerializedName("name")
1721
val name: String,
1822

1923
/**
2024
* Currency native symbol.
2125
*
2226
*/
27+
@SerializedName("symbolNative")
2328
val symbolNative: String,
2429

2530
/**
2631
* Number of decimal digits.
2732
*
2833
*/
34+
@SerializedName("decimalDigits")
2935
val decimalDigits: Long,
3036

3137
/**
3238
* Currency digit rounding.
3339
*
3440
*/
41+
@SerializedName("rounding")
3542
val rounding: Double,
3643

3744
/**
3845
* Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.
3946
*
4047
*/
48+
@SerializedName("code")
4149
val code: String,
4250

4351
/**
4452
* Currency plural name
4553
*
4654
*/
55+
@SerializedName("namePlural")
4756
val namePlural: String
4857
) {
4958
companion object {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.appwrite.models
22

3+
import com.google.gson.annotations.SerializedName
4+
35
/**
46
* Currencies List
57
*/
@@ -8,12 +10,14 @@ data class CurrencyList(
810
* Total number of items available on the server.
911
*
1012
*/
13+
@SerializedName("sum")
1114
val sum: Long,
1215

1316
/**
1417
* List of currencies.
1518
*
1619
*/
20+
@SerializedName("currencies")
1721
val currencies: List<Currency>
1822
) {
1923
companion object {

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.appwrite.models
22

3+
import com.google.gson.annotations.SerializedName
4+
35
/**
46
* Document
57
*/
@@ -8,24 +10,28 @@ data class Document(
810
* Document ID.
911
*
1012
*/
13+
@SerializedName("\$id")
1114
val id: String,
1215

1316
/**
1417
* Collection ID.
1518
*
1619
*/
20+
@SerializedName("\$collection")
1721
val collection: String,
1822

1923
/**
2024
* Document read permissions.
2125
*
2226
*/
27+
@SerializedName("\$read")
2328
val read: List<Any>,
2429

2530
/**
2631
* Document write permissions.
2732
*
2833
*/
34+
@SerializedName("\$write")
2935
val write: List<Any>,
3036

3137
val data: Map<String, Any>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.appwrite.models
22

3+
import com.google.gson.annotations.SerializedName
4+
35
/**
46
* Documents List
57
*/
@@ -8,12 +10,14 @@ data class DocumentList(
810
* Total number of items available on the server.
911
*
1012
*/
13+
@SerializedName("sum")
1114
val sum: Long,
1215

1316
/**
1417
* List of documents.
1518
*
1619
*/
20+
@SerializedName("documents")
1721
val documents: List<Document>
1822
) {
1923
companion object {

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.appwrite.models
22

3+
import com.google.gson.annotations.SerializedName
4+
35
/**
46
* Execution
57
*/
@@ -8,60 +10,70 @@ data class Execution(
810
* Execution ID.
911
*
1012
*/
13+
@SerializedName("\$id")
1114
val id: String,
1215

1316
/**
1417
* Execution read permissions.
1518
*
1619
*/
20+
@SerializedName("\$read")
1721
val read: List<Any>,
1822

1923
/**
2024
* Function ID.
2125
*
2226
*/
27+
@SerializedName("functionId")
2328
val functionId: String,
2429

2530
/**
2631
* The execution creation date in Unix timestamp.
2732
*
2833
*/
34+
@SerializedName("dateCreated")
2935
val dateCreated: Long,
3036

3137
/**
3238
* The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.
3339
*
3440
*/
41+
@SerializedName("trigger")
3542
val trigger: String,
3643

3744
/**
3845
* The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.
3946
*
4047
*/
48+
@SerializedName("status")
4149
val status: String,
4250

4351
/**
4452
* The script exit code.
4553
*
4654
*/
55+
@SerializedName("exitCode")
4756
val exitCode: Long,
4857

4958
/**
5059
* The script stdout output string. Logs the last 4,000 characters of the execution stdout output.
5160
*
5261
*/
62+
@SerializedName("stdout")
5363
val stdout: String,
5464

5565
/**
5666
* The script stderr output string. Logs the last 4,000 characters of the execution stderr output
5767
*
5868
*/
69+
@SerializedName("stderr")
5970
val stderr: String,
6071

6172
/**
6273
* The script execution time in seconds.
6374
*
6475
*/
76+
@SerializedName("time")
6577
val time: Double
6678
) {
6779
companion object {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.appwrite.models
22

3+
import com.google.gson.annotations.SerializedName
4+
35
/**
46
* Executions List
57
*/
@@ -8,12 +10,14 @@ data class ExecutionList(
810
* Total number of items available on the server.
911
*
1012
*/
13+
@SerializedName("sum")
1114
val sum: Long,
1215

1316
/**
1417
* List of executions.
1518
*
1619
*/
20+
@SerializedName("executions")
1721
val executions: List<Execution>
1822
) {
1923
companion object {

0 commit comments

Comments
 (0)