Skip to content

Commit e5f8956

Browse files
Merge pull request #56 from appwrite/dev
fix: params using enums
2 parents f028e7d + 2f9cbf2 commit e5f8956

11 files changed

+29
-25
lines changed

CHANGELOG.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 11.0.1
2+
3+
* Fixed parameters using enum types
4+
15
## 11.0.0
26

37
* Added enum support
@@ -20,7 +24,7 @@
2024

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

2529
## 9.0.0
2630

@@ -152,7 +156,7 @@
152156

153157
## 3.0.0
154158
- Support for Appwrite 0.12
155-
- **BREAKING** Updated database service to adapt 0.12 API
159+
- **BREAKING** Updated database service to adapt 0.12 API
156160
- **BREAKING** Custom ID support while creating resources
157161
- [View all the changes](https://github.com/appwrite/appwrite/blob/master/CHANGES.md#version-0120)
158162

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

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

202206
## 0.5.0-dev.1
203207

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Add this to your package's `pubspec.yaml` file:
2323

2424
```yml
2525
dependencies:
26-
dart_appwrite: ^11.0.0
26+
dart_appwrite: ^11.0.1
2727
```
2828
2929
You can install packages from the command line:

lib/services/account.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class Account extends Service {
290290

291291
final Map<String, dynamic> apiParams = {
292292

293-
'factor': factor,
293+
'factor': factor.value,
294294

295295
};
296296

lib/services/databases.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -668,11 +668,11 @@ class Databases extends Service {
668668
final Map<String, dynamic> apiParams = {
669669

670670
'relatedCollectionId': relatedCollectionId,
671-
'type': type,
671+
'type': type.value,
672672
'twoWay': twoWay,
673673
'key': key,
674674
'twoWayKey': twoWayKey,
675-
'onDelete': onDelete,
675+
'onDelete': onDelete?.value,
676676

677677
};
678678

@@ -849,7 +849,7 @@ class Databases extends Service {
849849

850850
final Map<String, dynamic> apiParams = {
851851

852-
'onDelete': onDelete,
852+
'onDelete': onDelete?.value,
853853

854854
};
855855

@@ -1021,7 +1021,7 @@ class Databases extends Service {
10211021
final Map<String, dynamic> apiParams = {
10221022

10231023
'key': key,
1024-
'type': type,
1024+
'type': type.value,
10251025
'attributes': attributes,
10261026
'orders': orders,
10271027

lib/services/functions.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Functions extends Service {
4343

4444
'functionId': functionId,
4545
'name': name,
46-
'runtime': runtime,
46+
'runtime': runtime.value,
4747
'execute': execute,
4848
'events': events,
4949
'schedule': schedule,
@@ -128,7 +128,7 @@ class Functions extends Service {
128128
final Map<String, dynamic> apiParams = {
129129

130130
'name': name,
131-
'runtime': runtime,
131+
'runtime': runtime?.value,
132132
'execute': execute,
133133
'events': events,
134134
'schedule': schedule,
@@ -395,7 +395,7 @@ class Functions extends Service {
395395
'body': body,
396396
'async': xasync,
397397
'path': path,
398-
'method': method,
398+
'method': method?.value,
399399
'headers': headers,
400400

401401
};

lib/services/messaging.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ class Messaging extends Service {
647647
'port': port,
648648
'username': username,
649649
'password': password,
650-
'encryption': encryption,
650+
'encryption': encryption?.value,
651651
'autoTLS': autoTLS,
652652
'mailer': mailer,
653653
'fromName': fromName,
@@ -682,7 +682,7 @@ class Messaging extends Service {
682682
'port': port,
683683
'username': username,
684684
'password': password,
685-
'encryption': encryption,
685+
'encryption': encryption?.value,
686686
'autoTLS': autoTLS,
687687
'mailer': mailer,
688688
'fromName': fromName,

lib/services/storage.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Storage extends Service {
4444
'enabled': enabled,
4545
'maximumFileSize': maximumFileSize,
4646
'allowedFileExtensions': allowedFileExtensions,
47-
'compression': compression,
47+
'compression': compression?.value,
4848
'encryption': encryption,
4949
'antivirus': antivirus,
5050

@@ -98,7 +98,7 @@ class Storage extends Service {
9898
'enabled': enabled,
9999
'maximumFileSize': maximumFileSize,
100100
'allowedFileExtensions': allowedFileExtensions,
101-
'compression': compression,
101+
'compression': compression?.value,
102102
'encryption': encryption,
103103
'antivirus': antivirus,
104104

@@ -317,15 +317,15 @@ class Storage extends Service {
317317
final Map<String, dynamic> params = {
318318
'width': width,
319319
'height': height,
320-
'gravity': gravity,
320+
'gravity': gravity?.value,
321321
'quality': quality,
322322
'borderWidth': borderWidth,
323323
'borderColor': borderColor,
324324
'borderRadius': borderRadius,
325325
'opacity': opacity,
326326
'rotation': rotation,
327327
'background': background,
328-
'output': output,
328+
'output': output?.value,
329329

330330

331331
'project': client.config['project'],

lib/services/users.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ class Users extends Service {
299299
'userId': userId,
300300
'email': email,
301301
'password': password,
302-
'passwordVersion': passwordVersion,
302+
'passwordVersion': passwordVersion?.value,
303303
'name': name,
304304

305305
};
@@ -867,7 +867,7 @@ class Users extends Service {
867867
final Map<String, dynamic> apiParams = {
868868

869869
'targetId': targetId,
870-
'providerType': providerType,
870+
'providerType': providerType.value,
871871
'identifier': identifier,
872872
'providerId': providerId,
873873
'name': name,

lib/src/client_browser.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
3333
'x-sdk-name': 'Dart',
3434
'x-sdk-platform': 'server',
3535
'x-sdk-language': 'dart',
36-
'x-sdk-version': '11.0.0',
36+
'x-sdk-version': '11.0.1',
3737
'X-Appwrite-Response-Format' : '1.5.0',
3838
};
3939

lib/src/client_io.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ class ClientIO extends ClientBase with ClientMixin {
4242
'x-sdk-name': 'Dart',
4343
'x-sdk-platform': 'server',
4444
'x-sdk-language': 'dart',
45-
'x-sdk-version': '11.0.0',
46-
'user-agent' : 'AppwriteDartSDK/11.0.0 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})',
45+
'x-sdk-version': '11.0.1',
46+
'user-agent' : 'AppwriteDartSDK/11.0.1 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})',
4747
'X-Appwrite-Response-Format' : '1.5.0',
4848
};
4949

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: dart_appwrite
2-
version: 11.0.0
2+
version: 11.0.1
33
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
44
homepage: https://appwrite.io
55
repository: https://github.com/appwrite/sdk-for-dart

0 commit comments

Comments
 (0)