Skip to content

Commit

Permalink
Merge pull request #56 from appwrite/dev
Browse files Browse the repository at this point in the history
fix: params using enums
  • Loading branch information
TorstenDittmann authored Mar 9, 2024
2 parents f028e7d + 2f9cbf2 commit e5f8956
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 25 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 11.0.1

* Fixed parameters using enum types

## 11.0.0

* Added enum support
Expand All @@ -20,7 +24,7 @@

* Added a new `label` function to the `Role` helper class
* Update internal variable names to prevent name collision
* Fix: content range header inconsistency in chunked uploads [#648](https://github.com/appwrite/sdk-generator/pull/648)
* Fix: content range header inconsistency in chunked uploads [#648](https://github.com/appwrite/sdk-generator/pull/648)

## 9.0.0

Expand Down Expand Up @@ -152,7 +156,7 @@

## 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)

Expand All @@ -178,7 +182,7 @@
- Breaking - changed param name from `env` to `runtime` in the **Functions** API
- Image Crop Gravity support in image preview service
- New endpoint in Account getSession to get session by ID
- New endpoint in the Users API to update user verification status
- New endpoint in the Users API to update user verification status
- Fix - issues with User-Agent when app name consisted of non-ASCII characters

## 0.6.2
Expand All @@ -197,7 +201,7 @@
- BREAKING Renamed parameter inviteId to membershipId on teams.updateMembershipStatus, teams.deleteMembership
- JWT Support client.setJWT('JWT_GENERATED_IN_CLIENT')
- [Update membership roles](https://appwrite.io/docs/references/cloud/server-dart/teams?sdk=dart#updateMembershipRoles)
- New awesome image preview features, supports borderRadius, borderColor, borderWidth
- New awesome image preview features, supports borderRadius, borderColor, borderWidth

## 0.5.0-dev.1

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Add this to your package's `pubspec.yaml` file:

```yml
dependencies:
dart_appwrite: ^11.0.0
dart_appwrite: ^11.0.1
```
You can install packages from the command line:
Expand Down
2 changes: 1 addition & 1 deletion lib/services/account.dart
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class Account extends Service {

final Map<String, dynamic> apiParams = {

'factor': factor,
'factor': factor.value,

};

Expand Down
8 changes: 4 additions & 4 deletions lib/services/databases.dart
Original file line number Diff line number Diff line change
Expand Up @@ -668,11 +668,11 @@ class Databases extends Service {
final Map<String, dynamic> apiParams = {

'relatedCollectionId': relatedCollectionId,
'type': type,
'type': type.value,
'twoWay': twoWay,
'key': key,
'twoWayKey': twoWayKey,
'onDelete': onDelete,
'onDelete': onDelete?.value,

};

Expand Down Expand Up @@ -849,7 +849,7 @@ class Databases extends Service {

final Map<String, dynamic> apiParams = {

'onDelete': onDelete,
'onDelete': onDelete?.value,

};

Expand Down Expand Up @@ -1021,7 +1021,7 @@ class Databases extends Service {
final Map<String, dynamic> apiParams = {

'key': key,
'type': type,
'type': type.value,
'attributes': attributes,
'orders': orders,

Expand Down
6 changes: 3 additions & 3 deletions lib/services/functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Functions extends Service {

'functionId': functionId,
'name': name,
'runtime': runtime,
'runtime': runtime.value,
'execute': execute,
'events': events,
'schedule': schedule,
Expand Down Expand Up @@ -128,7 +128,7 @@ class Functions extends Service {
final Map<String, dynamic> apiParams = {

'name': name,
'runtime': runtime,
'runtime': runtime?.value,
'execute': execute,
'events': events,
'schedule': schedule,
Expand Down Expand Up @@ -395,7 +395,7 @@ class Functions extends Service {
'body': body,
'async': xasync,
'path': path,
'method': method,
'method': method?.value,
'headers': headers,

};
Expand Down
4 changes: 2 additions & 2 deletions lib/services/messaging.dart
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ class Messaging extends Service {
'port': port,
'username': username,
'password': password,
'encryption': encryption,
'encryption': encryption?.value,
'autoTLS': autoTLS,
'mailer': mailer,
'fromName': fromName,
Expand Down Expand Up @@ -682,7 +682,7 @@ class Messaging extends Service {
'port': port,
'username': username,
'password': password,
'encryption': encryption,
'encryption': encryption?.value,
'autoTLS': autoTLS,
'mailer': mailer,
'fromName': fromName,
Expand Down
8 changes: 4 additions & 4 deletions lib/services/storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Storage extends Service {
'enabled': enabled,
'maximumFileSize': maximumFileSize,
'allowedFileExtensions': allowedFileExtensions,
'compression': compression,
'compression': compression?.value,
'encryption': encryption,
'antivirus': antivirus,

Expand Down Expand Up @@ -98,7 +98,7 @@ class Storage extends Service {
'enabled': enabled,
'maximumFileSize': maximumFileSize,
'allowedFileExtensions': allowedFileExtensions,
'compression': compression,
'compression': compression?.value,
'encryption': encryption,
'antivirus': antivirus,

Expand Down Expand Up @@ -317,15 +317,15 @@ class Storage extends Service {
final Map<String, dynamic> params = {
'width': width,
'height': height,
'gravity': gravity,
'gravity': gravity?.value,
'quality': quality,
'borderWidth': borderWidth,
'borderColor': borderColor,
'borderRadius': borderRadius,
'opacity': opacity,
'rotation': rotation,
'background': background,
'output': output,
'output': output?.value,


'project': client.config['project'],
Expand Down
4 changes: 2 additions & 2 deletions lib/services/users.dart
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class Users extends Service {
'userId': userId,
'email': email,
'password': password,
'passwordVersion': passwordVersion,
'passwordVersion': passwordVersion?.value,
'name': name,

};
Expand Down Expand Up @@ -867,7 +867,7 @@ class Users extends Service {
final Map<String, dynamic> apiParams = {

'targetId': targetId,
'providerType': providerType,
'providerType': providerType.value,
'identifier': identifier,
'providerId': providerId,
'name': name,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/client_browser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
'x-sdk-name': 'Dart',
'x-sdk-platform': 'server',
'x-sdk-language': 'dart',
'x-sdk-version': '11.0.0',
'x-sdk-version': '11.0.1',
'X-Appwrite-Response-Format' : '1.5.0',
};

Expand Down
4 changes: 2 additions & 2 deletions lib/src/client_io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class ClientIO extends ClientBase with ClientMixin {
'x-sdk-name': 'Dart',
'x-sdk-platform': 'server',
'x-sdk-language': 'dart',
'x-sdk-version': '11.0.0',
'user-agent' : 'AppwriteDartSDK/11.0.0 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})',
'x-sdk-version': '11.0.1',
'user-agent' : 'AppwriteDartSDK/11.0.1 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})',
'X-Appwrite-Response-Format' : '1.5.0',
};

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: dart_appwrite
version: 11.0.0
version: 11.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-dart
Expand Down

0 comments on commit e5f8956

Please sign in to comment.