Skip to content

Commit 50bc4c7

Browse files
committed
Update generated SDK
1 parent f45a820 commit 50bc4c7

File tree

8 files changed

+14
-35
lines changed

8 files changed

+14
-35
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:0.2.2")
42+
implementation("io.appwrite:sdk-for-kotlin:0.2.4")
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>0.2.2</version>
53+
<version>0.2.4</version>
5454
</dependency>
5555
</dependencies>
5656
```

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
ext {
77
PUBLISH_GROUP_ID = 'io.appwrite'
88
PUBLISH_ARTIFACT_ID = 'sdk-for-kotlin'
9-
PUBLISH_VERSION = '0.2.4-SNAPSHOT'
9+
PUBLISH_VERSION = '0.2.4'
1010
POM_URL = 'https://github.com/appwrite/sdk-for-kotlin'
1111
POM_SCM_URL = 'https://github.com/appwrite/sdk-for-kotlin'
1212
POM_ISSUE_URL = 'https://github.com/appwrite/sdk-for-kotlin/issues'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Client @JvmOverloads constructor(
5555
init {
5656
headers = mutableMapOf(
5757
"content-type" to "application/json",
58-
"x-sdk-version" to "appwrite:kotlin:0.2.4-SNAPSHOT",
58+
"x-sdk-version" to "appwrite:kotlin:0.2.4",
5959
"x-appwrite-response-format" to "0.12.0"
6060
)
6161
config = mutableMapOf()

src/main/kotlin/io/appwrite/models/AttributeString.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ data class AttributeString(
3838
* Attribute size.
3939
*
4040
*/
41-
val size: String,
41+
val size: Long,
4242

4343
/**
4444
* Default value for attribute when not provided. Cannot be set when attribute is required.
@@ -54,7 +54,7 @@ data class AttributeString(
5454
status = map["status"] as String,
5555
required = map["required"] as Boolean,
5656
array = map["array"] as? Boolean,
57-
size = map["size"] as String,
57+
size = (map["size"] as Number).toLong(),
5858
default = map["default"] as? String
5959
)
6060
}

src/main/kotlin/io/appwrite/models/Jwt.kt

Lines changed: 0 additions & 23 deletions
This file was deleted.

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,9 @@ class Account(client: Client) : Service(client) {
249249
/**
250250
* Update Account Preferences
251251
*
252-
* Update currently logged in user account preferences. You can pass only the
253-
* specific settings you wish to update.
252+
* Update currently logged in user account preferences. The object you pass is
253+
* stored as is, and replaces any previous value. The maximum allowed prefs
254+
* size is 64kB and throws error if exceeded.
254255
*
255256
* @param prefs Prefs key-value JSON object.
256257
* @return [io.appwrite.models.User]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ class Database(client: Client) : Service(client) {
740740
* integration](/docs/server/database#databaseCreateCollection) API or
741741
* directly from your database console.
742742
*
743-
* @param collectionId Collection ID. You can create a new collection with validation rules using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).
743+
* @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). Make sure to define attributes before creating documents.
744744
* @param documentId Document ID. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
745745
* @param data Document data as JSON object.
746746
* @param read An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.
@@ -820,7 +820,7 @@ class Database(client: Client) : Service(client) {
820820
* Update a document by its unique ID. Using the patch method you can pass
821821
* only specific fields that will get updated.
822822
*
823-
* @param collectionId Collection ID. You can create a new collection with validation rules using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).
823+
* @param collectionId Collection ID.
824824
* @param documentId Document ID.
825825
* @param data Document data as JSON object.
826826
* @param read An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,9 @@ class Users(client: Client) : Service(client) {
337337
/**
338338
* Update User Preferences
339339
*
340-
* Update the user preferences by its unique ID. You can pass only the
341-
* specific settings you wish to update.
340+
* Update the user preferences by its unique ID. The object you pass is stored
341+
* as is, and replaces any previous value. The maximum allowed prefs size is
342+
* 64kB and throws error if exceeded.
342343
*
343344
* @param userId User ID.
344345
* @param prefs Prefs key-value JSON object.

0 commit comments

Comments
 (0)