From 96e91627839e418550b411080a5ec36e110c57de Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 1 Sep 2023 17:29:06 +0000 Subject: [PATCH 1/4] chore: update sdks for appwrite 1.4.x --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 87846e8..3a4601e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Swift Package Manager](https://img.shields.io/github/v/release/appwrite/sdk-for-apple.svg?color=green&style=flat-square) ![License](https://img.shields.io/github/license/appwrite/sdk-for-apple.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.4.0-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.4.1-blue.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) From 0dd1dc191bc04dd4ae07d9f6d523224e98898efd Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 7 Sep 2023 21:24:18 +0000 Subject: [PATCH 2/4] chore: bug fixes for Apwrite 1.4.2 --- README.md | 2 +- Sources/Appwrite/Services/Account.swift | 4 ++-- Sources/Appwrite/Services/Teams.swift | 4 ++-- docs/examples/teams/create-membership.md | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3a4601e..968399f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Swift Package Manager](https://img.shields.io/github/v/release/appwrite/sdk-for-apple.svg?color=green&style=flat-square) ![License](https://img.shields.io/github/license/appwrite/sdk-for-apple.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.4.1-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.4.2-blue.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) diff --git a/Sources/Appwrite/Services/Account.swift b/Sources/Appwrite/Services/Account.swift index 6f56fc2..8c593c8 100644 --- a/Sources/Appwrite/Services/Account.swift +++ b/Sources/Appwrite/Services/Account.swift @@ -1014,8 +1014,8 @@ open class Account: Service { "project": client.config["project"] ] - let query = "?\(client.parametersToQueryString(params: params))" - let url = URL(string: client.endPoint + api_path + query)! + let query = "?\(client.parametersToQueryString(params: apiParams))" + let url = URL(string: client.endPoint + apiPath + query)! let callbackScheme = "appwrite-callback-\(client.config["project"] ?? "")" let group = DispatchGroup() diff --git a/Sources/Appwrite/Services/Teams.swift b/Sources/Appwrite/Services/Teams.swift index 18c012e..2b41859 100644 --- a/Sources/Appwrite/Services/Teams.swift +++ b/Sources/Appwrite/Services/Teams.swift @@ -350,10 +350,10 @@ open class Teams: Service { /// /// @param String teamId /// @param [String] roles - /// @param String url /// @param String email /// @param String userId /// @param String phone + /// @param String url /// @param String name /// @throws Exception /// @return array @@ -361,10 +361,10 @@ open class Teams: Service { open func createMembership( teamId: String, roles: [String], - url: String, email: String? = nil, userId: String? = nil, phone: String? = nil, + url: String? = nil, name: String? = nil ) async throws -> AppwriteModels.Membership { let apiPath: String = "/teams/{teamId}/memberships" diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md index 1936f9d..6de7074 100644 --- a/docs/examples/teams/create-membership.md +++ b/docs/examples/teams/create-membership.md @@ -8,7 +8,6 @@ let teams = Teams(client) let membership = try await teams.createMembership( teamId: "[TEAM_ID]", - roles: [], - url: "https://example.com" + roles: [] ) From c8f114ff1ef8605d3c376c2b8b96f5b2df4dc855 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 7 Sep 2023 21:34:32 +0000 Subject: [PATCH 3/4] chore: updates for appwrite 1.4.2 --- README.md | 2 +- Sources/Appwrite/Client.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 968399f..f2ac15b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Add the package to your `Package.swift` dependencies: ```swift dependencies: [ - .package(url: "git@github.com:appwrite/sdk-for-apple.git", from: "3.0.1"), + .package(url: "git@github.com:appwrite/sdk-for-apple.git", from: "3.0.2"), ], ``` diff --git a/Sources/Appwrite/Client.swift b/Sources/Appwrite/Client.swift index d38b1c2..69d9c98 100644 --- a/Sources/Appwrite/Client.swift +++ b/Sources/Appwrite/Client.swift @@ -23,7 +23,7 @@ open class Client { "x-sdk-name": "Apple", "x-sdk-platform": "client", "x-sdk-language": "apple", - "x-sdk-version": "3.0.1", + "x-sdk-version": "3.0.2", "X-Appwrite-Response-Format": "1.4.0" ] From 978e8784cc28711fd2365cb22c121389ca975a2f Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 7 Sep 2023 21:51:19 +0000 Subject: [PATCH 4/4] chore: updates for appwrite 1.4.2 --- README.md | 2 +- Sources/Appwrite/Client.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f2ac15b..27de181 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Add the package to your `Package.swift` dependencies: ```swift dependencies: [ - .package(url: "git@github.com:appwrite/sdk-for-apple.git", from: "3.0.2"), + .package(url: "git@github.com:appwrite/sdk-for-apple.git", from: "4.0.0"), ], ``` diff --git a/Sources/Appwrite/Client.swift b/Sources/Appwrite/Client.swift index 69d9c98..d5f2be0 100644 --- a/Sources/Appwrite/Client.swift +++ b/Sources/Appwrite/Client.swift @@ -23,7 +23,7 @@ open class Client { "x-sdk-name": "Apple", "x-sdk-platform": "client", "x-sdk-language": "apple", - "x-sdk-version": "3.0.2", + "x-sdk-version": "4.0.0", "X-Appwrite-Response-Format": "1.4.0" ]