From b4f5d5dc7e841e5c06eb351cfa472cd33202bf8f Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 1 Sep 2023 17:30:04 +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 79474ef..fa5f037 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Appwrite Ruby SDK ![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.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 bcf774f133d81af162a367d1866fc4f597e10263 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 7 Sep 2023 21:25:06 +0000 Subject: [PATCH 2/4] chore: bug fixes for Apwrite 1.4.2 --- README.md | 2 +- docs/examples/functions/create.md | 2 +- docs/examples/functions/update.md | 2 +- docs/examples/teams/create-membership.md | 2 +- lib/appwrite/services/functions.rb | 6 +----- lib/appwrite/services/teams.rb | 8 ++------ lib/appwrite/services/users.rb | 2 +- 7 files changed, 8 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index fa5f037..5fa5b90 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Appwrite Ruby SDK ![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.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/docs/examples/functions/create.md b/docs/examples/functions/create.md index 3f9b84d..af0f686 100644 --- a/docs/examples/functions/create.md +++ b/docs/examples/functions/create.md @@ -9,6 +9,6 @@ client = Client.new functions = Functions.new(client) -response = functions.create(function_id: '[FUNCTION_ID]', name: '[NAME]', runtime: 'node-14.5') +response = functions.create(function_id: '[FUNCTION_ID]', name: '[NAME]', runtime: 'node-18.0') puts response.inspect \ No newline at end of file diff --git a/docs/examples/functions/update.md b/docs/examples/functions/update.md index 30929d4..8503a50 100644 --- a/docs/examples/functions/update.md +++ b/docs/examples/functions/update.md @@ -9,6 +9,6 @@ client = Client.new functions = Functions.new(client) -response = functions.update(function_id: '[FUNCTION_ID]', name: '[NAME]', runtime: 'node-14.5') +response = functions.update(function_id: '[FUNCTION_ID]', name: '[NAME]') puts response.inspect \ No newline at end of file diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md index 30f343c..b96333d 100644 --- a/docs/examples/teams/create-membership.md +++ b/docs/examples/teams/create-membership.md @@ -9,6 +9,6 @@ client = Client.new teams = Teams.new(client) -response = teams.create_membership(team_id: '[TEAM_ID]', roles: [], url: 'https://example.com') +response = teams.create_membership(team_id: '[TEAM_ID]', roles: []) puts response.inspect \ No newline at end of file diff --git a/lib/appwrite/services/functions.rb b/lib/appwrite/services/functions.rb index 0c87c67..b1437e3 100644 --- a/lib/appwrite/services/functions.rb +++ b/lib/appwrite/services/functions.rb @@ -188,7 +188,7 @@ def get(function_id:) # @param [String] provider_root_directory Path to function code in the linked repo. # # @return [Function] - def update(function_id:, name:, runtime:, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil) + def update(function_id:, name:, runtime: nil, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil) api_path = '/functions/{functionId}' .gsub('{functionId}', function_id) @@ -200,10 +200,6 @@ def update(function_id:, name:, runtime:, execute: nil, events: nil, schedule: n raise Appwrite::Exception.new('Missing required parameter: "name"') end - if runtime.nil? - raise Appwrite::Exception.new('Missing required parameter: "runtime"') - end - api_params = { name: name, runtime: runtime, diff --git a/lib/appwrite/services/teams.rb b/lib/appwrite/services/teams.rb index 31c1cc8..27eddc2 100644 --- a/lib/appwrite/services/teams.rb +++ b/lib/appwrite/services/teams.rb @@ -231,14 +231,14 @@ def list_memberships(team_id:, queries: nil, search: nil) # # @param [String] team_id Team ID. # @param [Array] 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. - # @param [String] 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. # @param [String] email Email of the new team member. # @param [String] user_id ID of the user to be added to a team. # @param [String] phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. + # @param [String] 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. # @param [String] name Name of the new team member. Max length: 128 chars. # # @return [Membership] - def create_membership(team_id:, roles:, url:, email: nil, user_id: nil, phone: nil, name: nil) + def create_membership(team_id:, roles:, email: nil, user_id: nil, phone: nil, url: nil, name: nil) api_path = '/teams/{teamId}/memberships' .gsub('{teamId}', team_id) @@ -250,10 +250,6 @@ def create_membership(team_id:, roles:, url:, email: nil, user_id: nil, phone: n raise Appwrite::Exception.new('Missing required parameter: "roles"') end - if url.nil? - raise Appwrite::Exception.new('Missing required parameter: "url"') - end - api_params = { email: email, userId: user_id, diff --git a/lib/appwrite/services/users.rb b/lib/appwrite/services/users.rb index e5d00b0..8175c18 100644 --- a/lib/appwrite/services/users.rb +++ b/lib/appwrite/services/users.rb @@ -617,7 +617,7 @@ def update_email(user_id:, email:) # docs](/docs/permissions) for more info. # # @param [String] user_id User ID. - # @param [Array] labels Array of user labels. Replaces the previous labels. Maximum of 5 labels are allowed, each up to 36 alphanumeric characters long. + # @param [Array] labels Array of user labels. Replaces the previous labels. Maximum of 100 labels are allowed, each up to 36 alphanumeric characters long. # # @return [User] def update_labels(user_id:, labels:) From 4388b0977434685ac91678156d09d75f3fd56018 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 7 Sep 2023 21:35:16 +0000 Subject: [PATCH 3/4] chore: updates for appwrite 1.4.2 --- appwrite.gemspec | 2 +- lib/appwrite/client.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appwrite.gemspec b/appwrite.gemspec index 480bebc..c758694 100644 --- a/appwrite.gemspec +++ b/appwrite.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |spec| spec.name = 'appwrite' - spec.version = '9.0.1' + spec.version = '9.0.2' spec.license = 'BSD-3-Clause' spec.summary = 'Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API' spec.author = 'Appwrite Team' diff --git a/lib/appwrite/client.rb b/lib/appwrite/client.rb index 77bea22..289904f 100644 --- a/lib/appwrite/client.rb +++ b/lib/appwrite/client.rb @@ -15,7 +15,7 @@ def initialize 'x-sdk-name'=> 'Ruby', 'x-sdk-platform'=> 'server', 'x-sdk-language'=> 'ruby', - 'x-sdk-version'=> '9.0.1', + 'x-sdk-version'=> '9.0.2', 'X-Appwrite-Response-Format' => '1.4.0' } @endpoint = 'https://HOSTNAME/v1' From a68629dc50fbc8bd445be387bbf0a77041ec44ff Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 7 Sep 2023 21:52:10 +0000 Subject: [PATCH 4/4] chore: updates for appwrite 1.4.2 --- appwrite.gemspec | 2 +- lib/appwrite/client.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appwrite.gemspec b/appwrite.gemspec index c758694..eb0c7ad 100644 --- a/appwrite.gemspec +++ b/appwrite.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |spec| spec.name = 'appwrite' - spec.version = '9.0.2' + spec.version = '10.0.0' spec.license = 'BSD-3-Clause' spec.summary = 'Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API' spec.author = 'Appwrite Team' diff --git a/lib/appwrite/client.rb b/lib/appwrite/client.rb index 289904f..a13fccb 100644 --- a/lib/appwrite/client.rb +++ b/lib/appwrite/client.rb @@ -15,7 +15,7 @@ def initialize 'x-sdk-name'=> 'Ruby', 'x-sdk-platform'=> 'server', 'x-sdk-language'=> 'ruby', - 'x-sdk-version'=> '9.0.2', + 'x-sdk-version'=> '10.0.0', 'X-Appwrite-Response-Format' => '1.4.0' } @endpoint = 'https://HOSTNAME/v1'