Skip to content

Commit

Permalink
Merge pull request #53 from appwrite/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
christyjacob4 authored Feb 14, 2024
2 parents 397de91 + 8f12fc8 commit e29166b
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2023 Appwrite (https://appwrite.io) and individual contributors.
Copyright (c) 2024 Appwrite (https://appwrite.io) and individual contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
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: ^10.1.0
dart_appwrite: ^10.1.1
```
You can install packages from the command line:
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': '10.1.0',
'x-sdk-version': '10.1.1',
'X-Appwrite-Response-Format' : '1.4.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': '10.1.0',
'user-agent' : 'AppwriteDartSDK/10.1.0 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})',
'x-sdk-version': '10.1.1',
'user-agent' : 'AppwriteDartSDK/10.1.1 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})',
'X-Appwrite-Response-Format' : '1.4.0',
};

Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/attribute_enum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AttributeEnum implements Model {
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
elements: map['elements'],
elements: map['elements'] ?? [],
format: map['format'].toString(),
xdefault: map['default']?.toString(),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/attribute_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AttributeList implements Model {
factory AttributeList.fromMap(Map<String, dynamic> map) {
return AttributeList(
total: map['total'],
attributes: map['attributes'],
attributes: map['attributes'] ?? [],
);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/src/models/bucket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ class Bucket implements Model {
$id: map['\$id'].toString(),
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
$permissions: map['\$permissions'],
$permissions: map['\$permissions'] ?? [],
fileSecurity: map['fileSecurity'],
name: map['name'].toString(),
enabled: map['enabled'],
maximumFileSize: map['maximumFileSize'],
allowedFileExtensions: map['allowedFileExtensions'],
allowedFileExtensions: map['allowedFileExtensions'] ?? [],
compression: map['compression'].toString(),
encryption: map['encryption'],
antivirus: map['antivirus'],
Expand Down
4 changes: 2 additions & 2 deletions lib/src/models/collection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ class Collection implements Model {
$id: map['\$id'].toString(),
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
$permissions: map['\$permissions'],
$permissions: map['\$permissions'] ?? [],
databaseId: map['databaseId'].toString(),
name: map['name'].toString(),
enabled: map['enabled'],
documentSecurity: map['documentSecurity'],
attributes: map['attributes'],
attributes: map['attributes'] ?? [],
indexes: List<Index>.from(map['indexes'].map((p) => Index.fromMap(p))),
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/document.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Document implements Model {
$databaseId: map['\$databaseId'].toString(),
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
$permissions: map['\$permissions'],
$permissions: map['\$permissions'] ?? [],
data: map,
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/execution.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Execution implements Model {
$id: map['\$id'].toString(),
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
$permissions: map['\$permissions'],
$permissions: map['\$permissions'] ?? [],
functionId: map['functionId'].toString(),
trigger: map['trigger'].toString(),
status: map['status'].toString(),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/file.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class File implements Model {
bucketId: map['bucketId'].toString(),
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
$permissions: map['\$permissions'],
$permissions: map['\$permissions'] ?? [],
name: map['name'].toString(),
signature: map['signature'].toString(),
mimeType: map['mimeType'].toString(),
Expand Down
4 changes: 2 additions & 2 deletions lib/src/models/function.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ class Func implements Model {
$id: map['\$id'].toString(),
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
execute: map['execute'],
execute: map['execute'] ?? [],
name: map['name'].toString(),
enabled: map['enabled'],
live: map['live'],
logging: map['logging'],
runtime: map['runtime'].toString(),
deployment: map['deployment'].toString(),
vars: List<Variable>.from(map['vars'].map((p) => Variable.fromMap(p))),
events: map['events'],
events: map['events'] ?? [],
schedule: map['schedule'].toString(),
timeout: map['timeout'],
entrypoint: map['entrypoint'].toString(),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Index implements Model {
type: map['type'].toString(),
status: map['status'].toString(),
error: map['error'].toString(),
attributes: map['attributes'],
attributes: map['attributes'] ?? [],
orders: map['orders'],
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/membership.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Membership implements Model {
invited: map['invited'].toString(),
joined: map['joined'].toString(),
confirm: map['confirm'],
roles: map['roles'],
roles: map['roles'] ?? [],
);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/runtime.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Runtime implements Model {
base: map['base'].toString(),
image: map['image'].toString(),
logo: map['logo'].toString(),
supports: map['supports'],
supports: map['supports'] ?? [],
);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class User implements Model {
hashOptions: map['hashOptions'],
registration: map['registration'].toString(),
status: map['status'],
labels: map['labels'],
labels: map['labels'] ?? [],
passwordUpdate: map['passwordUpdate'].toString(),
email: map['email'].toString(),
phone: map['phone'].toString(),
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: 10.1.0
version: 10.1.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 e29166b

Please sign in to comment.