From 2b967bf27752db1ae149d976123beb2c0db9fd5c Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Sat, 9 Mar 2024 12:32:50 +0100 Subject: [PATCH] fix: params using enums --- CHANGELOG.md | 10 +++++++--- README.md | 2 +- lib/services/account.dart | 2 +- lib/services/functions.dart | 2 +- lib/services/storage.dart | 4 ++-- lib/src/client_browser.dart | 2 +- lib/src/client_io.dart | 2 +- pubspec.yaml | 2 +- 8 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac08f820..56e3b37e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 12.0.1 + +* Fixed parameters using enum types + ## 12.0.0 * Added enum support @@ -95,7 +99,7 @@ 4. `greaterEqual` renamed to `greaterThanEqual` * `User` response model is now renamed to `Account` -**Full Changelog for Appwrite 1.0.0 can be found here**: +**Full Changelog for Appwrite 1.0.0 can be found here**: https://github.com/appwrite/appwrite/blob/master/CHANGES.md ## 7.0.0 @@ -148,7 +152,7 @@ https://github.com/appwrite/appwrite/blob/master/CHANGES.md ## 3.0.0 - Support for Appwrite 0.12 -- **BREAKING** Updated database service to adapt 0.12 API +- **BREAKING** Updated database service to adapt 0.12 API - **BREAKING** Custom ID support while creating resources - [View all the changes](https://github.com/appwrite/appwrite/blob/master/CHANGES.md#version-0120) @@ -226,7 +230,7 @@ https://github.com/appwrite/appwrite/blob/master/CHANGES.md - Fallback Cookies for Flutter Web if 3rd party cookies are blocked - Custom User Agent Support - [Update membership roles](https://appwrite.io/docs/references/cloud/client-flutter/teams?sdk=flutter#updateMembershipRoles) -- New awesome image preview features, supports borderRadius, borderColor, borderWidth +- New awesome image preview features, supports borderRadius, borderColor, borderWidth ## 0.5.0-dev.1 diff --git a/README.md b/README.md index a367b2ef..2b092cfb 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Add this to your package's `pubspec.yaml` file: ```yml dependencies: - appwrite: ^12.0.0 + appwrite: ^12.0.1 ``` You can install packages from the command line: diff --git a/lib/services/account.dart b/lib/services/account.dart index dfb78927..6f8cbac2 100644 --- a/lib/services/account.dart +++ b/lib/services/account.dart @@ -257,7 +257,7 @@ class Account extends Service { const String apiPath = '/account/mfa/challenge'; final Map apiParams = { - 'factor': factor, + 'factor': factor.value, }; final Map apiHeaders = { diff --git a/lib/services/functions.dart b/lib/services/functions.dart index f3688b4c..da6f16c9 100644 --- a/lib/services/functions.dart +++ b/lib/services/functions.dart @@ -41,7 +41,7 @@ class Functions extends Service { 'body': body, 'async': xasync, 'path': path, - 'method': method, + 'method': method?.value, 'headers': headers, }; diff --git a/lib/services/storage.dart b/lib/services/storage.dart index 36643e08..cfecd691 100644 --- a/lib/services/storage.dart +++ b/lib/services/storage.dart @@ -172,7 +172,7 @@ class Storage extends Service { 'width': width, 'height': height, - 'gravity': gravity, + 'gravity': gravity?.value, 'quality': quality, 'borderWidth': borderWidth, 'borderColor': borderColor, @@ -180,7 +180,7 @@ class Storage extends Service { 'opacity': opacity, 'rotation': rotation, 'background': background, - 'output': output, + 'output': output?.value, 'project': client.config['project'], }; diff --git a/lib/src/client_browser.dart b/lib/src/client_browser.dart index 6f3ded4b..f247c124 100644 --- a/lib/src/client_browser.dart +++ b/lib/src/client_browser.dart @@ -43,7 +43,7 @@ class ClientBrowser extends ClientBase with ClientMixin { 'x-sdk-name': 'Flutter', 'x-sdk-platform': 'client', 'x-sdk-language': 'flutter', - 'x-sdk-version': '12.0.0', + 'x-sdk-version': '12.0.1', 'X-Appwrite-Response-Format': '1.5.0', }; diff --git a/lib/src/client_io.dart b/lib/src/client_io.dart index 88063f39..fd1f7633 100644 --- a/lib/src/client_io.dart +++ b/lib/src/client_io.dart @@ -64,7 +64,7 @@ class ClientIO extends ClientBase with ClientMixin { 'x-sdk-name': 'Flutter', 'x-sdk-platform': 'client', 'x-sdk-language': 'flutter', - 'x-sdk-version': '12.0.0', + 'x-sdk-version': '12.0.1', 'X-Appwrite-Response-Format' : '1.5.0', }; diff --git a/pubspec.yaml b/pubspec.yaml index adbd5bb5..7007fe73 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: appwrite -version: 12.0.0 +version: 12.0.1 description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API homepage: https://appwrite.io repository: https://github.com/appwrite/sdk-for-flutter