Skip to content

Commit 75d2ad8

Browse files
Merge pull request #34 from appwrite/dev
Dev
2 parents c0c5bb6 + 272834a commit 75d2ad8

File tree

11 files changed

+12
-16
lines changed

11 files changed

+12
-16
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-kotlin.svg?color=green&style=flat-square)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-kotlin.svg?style=flat-square)
5-
![Version](https://img.shields.io/badge/api%20version-1.4.0-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.4.2-blue.svg?style=flat-square)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
88

@@ -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:3.0.1")
42+
implementation("io.appwrite:sdk-for-kotlin:4.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>3.0.1</version>
53+
<version>4.0.0</version>
5454
</dependency>
5555
</dependencies>
5656
```

docs/examples/java/functions/create.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Functions functions = new Functions(client);
1212
functions.create(
1313
"[FUNCTION_ID]",
1414
"[NAME]",
15-
"node-14.5",
15+
"node-18.0",
1616
new CoroutineCallback<>((result, error) -> {
1717
if (error != null) {
1818
error.printStackTrace();

docs/examples/java/functions/update.md

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Functions functions = new Functions(client);
1212
functions.update(
1313
"[FUNCTION_ID]",
1414
"[NAME]",
15-
"node-14.5",
1615
new CoroutineCallback<>((result, error) -> {
1716
if (error != null) {
1817
error.printStackTrace();

docs/examples/java/teams/create-membership.md

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Teams teams = new Teams(client);
1212
teams.createMembership(
1313
"[TEAM_ID]",
1414
listOf(),
15-
"https://example.com",
1615
new CoroutineCallback<>((result, error) -> {
1716
if (error != null) {
1817
error.printStackTrace();

docs/examples/kotlin/functions/create.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ val functions = Functions(client)
1111
val response = functions.create(
1212
functionId = "[FUNCTION_ID]",
1313
name = "[NAME]",
14-
runtime = "node-14.5",
14+
runtime = "node-18.0",
1515
)

docs/examples/kotlin/functions/update.md

-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ val functions = Functions(client)
1111
val response = functions.update(
1212
functionId = "[FUNCTION_ID]",
1313
name = "[NAME]",
14-
runtime = "node-14.5",
1514
)

docs/examples/kotlin/teams/create-membership.md

-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ val teams = Teams(client)
1111
val response = teams.createMembership(
1212
teamId = "[TEAM_ID]",
1313
roles = listOf(),
14-
url = "https://example.com",
1514
)

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ class Client @JvmOverloads constructor(
6262
init {
6363
headers = mutableMapOf(
6464
"content-type" to "application/json",
65-
"user-agent" to "AppwriteKotlinSDK/3.0.1 ${System.getProperty("http.agent")}",
65+
"user-agent" to "AppwriteKotlinSDK/4.0.0 ${System.getProperty("http.agent")}",
6666
"x-sdk-name" to "Kotlin",
6767
"x-sdk-platform" to "server",
6868
"x-sdk-language" to "kotlin",
69-
"x-sdk-version" to "3.0.1", "x-appwrite-response-format" to "1.4.0"
69+
"x-sdk-version" to "4.0.0", "x-appwrite-response-format" to "1.4.0"
7070
)
7171
config = mutableMapOf()
7272

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class Functions : Service {
235235
suspend fun update(
236236
functionId: String,
237237
name: String,
238-
runtime: String,
238+
runtime: String? = null,
239239
execute: List<String>? = null,
240240
events: List<String>? = null,
241241
schedule: String? = null,

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ class Teams : Service {
318318
*
319319
* @param teamId Team ID.
320320
* @param roles Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
321-
* @param url URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
322321
* @param email Email of the new team member.
323322
* @param userId ID of the user to be added to a team.
324323
* @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
324+
* @param url URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
325325
* @param name Name of the new team member. Max length: 128 chars.
326326
* @return [io.appwrite.models.Membership]
327327
*/
@@ -330,10 +330,10 @@ class Teams : Service {
330330
suspend fun createMembership(
331331
teamId: String,
332332
roles: List<String>,
333-
url: String,
334333
email: String? = null,
335334
userId: String? = null,
336335
phone: String? = null,
336+
url: String? = null,
337337
name: String? = null,
338338
): io.appwrite.models.Membership {
339339
val apiPath = "/teams/{teamId}/memberships"

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ class Users : Service {
899899
* Update the user labels by its unique ID. Labels can be used to grant access to resources. While teams are a way for user&#039;s to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](/docs/permissions) for more info.
900900
*
901901
* @param userId User ID.
902-
* @param labels Array of user labels. Replaces the previous labels. Maximum of 5 labels are allowed, each up to 36 alphanumeric characters long.
902+
* @param labels Array of user labels. Replaces the previous labels. Maximum of 100 labels are allowed, each up to 36 alphanumeric characters long.
903903
* @return [io.appwrite.models.User<T>]
904904
*/
905905
@Throws(AppwriteException::class)
@@ -936,7 +936,7 @@ class Users : Service {
936936
* Update the user labels by its unique ID. Labels can be used to grant access to resources. While teams are a way for user&#039;s to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](/docs/permissions) for more info.
937937
*
938938
* @param userId User ID.
939-
* @param labels Array of user labels. Replaces the previous labels. Maximum of 5 labels are allowed, each up to 36 alphanumeric characters long.
939+
* @param labels Array of user labels. Replaces the previous labels. Maximum of 100 labels are allowed, each up to 36 alphanumeric characters long.
940940
* @return [io.appwrite.models.User<T>]
941941
*/
942942
@Throws(AppwriteException::class)

0 commit comments

Comments
 (0)