diff --git a/README.md b/README.md index dd0791e3..f83d6589 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Add this to your package's `pubspec.yaml` file: ```yml dependencies: - dart_appwrite: ^12.0.0 + dart_appwrite: ^12.1.0 ``` You can install packages from the command line: diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index 197116bd..489ce409 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/databases/update-boolean-attribute.md @@ -13,4 +13,5 @@ AttributeBoolean result = await databases.updateBooleanAttribute( key: '', xrequired: false, xdefault: false, + newKey: '', // (optional) ); diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index ab787e53..73f61e26 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/databases/update-datetime-attribute.md @@ -13,4 +13,5 @@ AttributeDatetime result = await databases.updateDatetimeAttribute( key: '', xrequired: false, xdefault: '', + newKey: '', // (optional) ); diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index baa41b30..37bcd4d7 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/examples/databases/update-email-attribute.md @@ -13,4 +13,5 @@ AttributeEmail result = await databases.updateEmailAttribute( key: '', xrequired: false, xdefault: 'email@example.com', + newKey: '', // (optional) ); diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index 847f8b38..f47078c8 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/examples/databases/update-enum-attribute.md @@ -14,4 +14,5 @@ AttributeEnum result = await databases.updateEnumAttribute( elements: [], xrequired: false, xdefault: '', + newKey: '', // (optional) ); diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index e8656bfb..8e023bc4 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -15,4 +15,5 @@ AttributeFloat result = await databases.updateFloatAttribute( min: 0, max: 0, xdefault: 0, + newKey: '', // (optional) ); diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index 3175ebfb..1dac743a 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -15,4 +15,5 @@ AttributeInteger result = await databases.updateIntegerAttribute( min: 0, max: 0, xdefault: 0, + newKey: '', // (optional) ); diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index 0270349e..dc83bd00 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/examples/databases/update-ip-attribute.md @@ -13,4 +13,5 @@ AttributeIp result = await databases.updateIpAttribute( key: '', xrequired: false, xdefault: '', + newKey: '', // (optional) ); diff --git a/docs/examples/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index 37106ee5..6d14f52d 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/databases/update-relationship-attribute.md @@ -12,4 +12,5 @@ AttributeRelationship result = await databases.updateRelationshipAttribute( collectionId: '', key: '', onDelete: RelationMutate.cascade, // (optional) + newKey: '', // (optional) ); diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index 6e08af2f..c2f3804c 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -13,4 +13,6 @@ AttributeString result = await databases.updateStringAttribute( key: '', xrequired: false, xdefault: '', + size: 0, // (optional) + newKey: '', // (optional) ); diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index c14537fb..20c11faf 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/examples/databases/update-url-attribute.md @@ -13,4 +13,5 @@ AttributeUrl result = await databases.updateUrlAttribute( key: '', xrequired: false, xdefault: 'https://example.com', + newKey: '', // (optional) ); diff --git a/docs/examples/functions/create-deployment.md b/docs/examples/functions/create-deployment.md index d098366e..297bdc61 100644 --- a/docs/examples/functions/create-deployment.md +++ b/docs/examples/functions/create-deployment.md @@ -1,3 +1,4 @@ +import 'dart:io'; import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() diff --git a/lib/services/databases.dart b/lib/services/databases.dart index 61ddaf19..5d3a8c86 100644 --- a/lib/services/databases.dart +++ b/lib/services/databases.dart @@ -318,7 +318,8 @@ class Databases extends Service { required String collectionId, required String key, required bool xrequired, - required bool? xdefault}) async { + required bool? xdefault, + String? newKey}) async { final String apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}' .replaceAll('{databaseId}', databaseId) @@ -328,6 +329,7 @@ class Databases extends Service { final Map apiParams = { 'required': xrequired, 'default': xdefault, + 'newKey': newKey, }; final Map apiHeaders = { @@ -381,7 +383,8 @@ class Databases extends Service { required String collectionId, required String key, required bool xrequired, - required String? xdefault}) async { + required String? xdefault, + String? newKey}) async { final String apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}' .replaceAll('{databaseId}', databaseId) @@ -391,6 +394,7 @@ class Databases extends Service { final Map apiParams = { 'required': xrequired, 'default': xdefault, + 'newKey': newKey, }; final Map apiHeaders = { @@ -446,7 +450,8 @@ class Databases extends Service { required String collectionId, required String key, required bool xrequired, - required String? xdefault}) async { + required String? xdefault, + String? newKey}) async { final String apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}' .replaceAll('{databaseId}', databaseId) @@ -456,6 +461,7 @@ class Databases extends Service { final Map apiParams = { 'required': xrequired, 'default': xdefault, + 'newKey': newKey, }; final Map apiHeaders = { @@ -515,7 +521,8 @@ class Databases extends Service { required String key, required List elements, required bool xrequired, - required String? xdefault}) async { + required String? xdefault, + String? newKey}) async { final String apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}' .replaceAll('{databaseId}', databaseId) @@ -526,6 +533,7 @@ class Databases extends Service { 'elements': elements, 'required': xrequired, 'default': xdefault, + 'newKey': newKey, }; final Map apiHeaders = { @@ -588,7 +596,8 @@ class Databases extends Service { required bool xrequired, required double min, required double max, - required double? xdefault}) async { + required double? xdefault, + String? newKey}) async { final String apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}' .replaceAll('{databaseId}', databaseId) @@ -600,6 +609,7 @@ class Databases extends Service { 'min': min, 'max': max, 'default': xdefault, + 'newKey': newKey, }; final Map apiHeaders = { @@ -662,7 +672,8 @@ class Databases extends Service { required bool xrequired, required int min, required int max, - required int? xdefault}) async { + required int? xdefault, + String? newKey}) async { final String apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}' .replaceAll('{databaseId}', databaseId) @@ -674,6 +685,7 @@ class Databases extends Service { 'min': min, 'max': max, 'default': xdefault, + 'newKey': newKey, }; final Map apiHeaders = { @@ -729,7 +741,8 @@ class Databases extends Service { required String collectionId, required String key, required bool xrequired, - required String? xdefault}) async { + required String? xdefault, + String? newKey}) async { final String apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}' .replaceAll('{databaseId}', databaseId) @@ -739,6 +752,7 @@ class Databases extends Service { final Map apiParams = { 'required': xrequired, 'default': xdefault, + 'newKey': newKey, }; final Map apiHeaders = { @@ -836,7 +850,9 @@ class Databases extends Service { required String collectionId, required String key, required bool xrequired, - required String? xdefault}) async { + required String? xdefault, + int? size, + String? newKey}) async { final String apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}' .replaceAll('{databaseId}', databaseId) @@ -846,6 +862,8 @@ class Databases extends Service { final Map apiParams = { 'required': xrequired, 'default': xdefault, + 'size': size, + 'newKey': newKey, }; final Map apiHeaders = { @@ -901,7 +919,8 @@ class Databases extends Service { required String collectionId, required String key, required bool xrequired, - required String? xdefault}) async { + required String? xdefault, + String? newKey}) async { final String apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}' .replaceAll('{databaseId}', databaseId) @@ -911,6 +930,7 @@ class Databases extends Service { final Map apiParams = { 'required': xrequired, 'default': xdefault, + 'newKey': newKey, }; final Map apiHeaders = { @@ -982,7 +1002,8 @@ class Databases extends Service { {required String databaseId, required String collectionId, required String key, - enums.RelationMutate? onDelete}) async { + enums.RelationMutate? onDelete, + String? newKey}) async { final String apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship' .replaceAll('{databaseId}', databaseId) @@ -991,6 +1012,7 @@ class Databases extends Service { final Map apiParams = { 'onDelete': onDelete?.value, + 'newKey': newKey, }; final Map apiHeaders = { diff --git a/lib/src/client_browser.dart b/lib/src/client_browser.dart index ddccf6f3..c75d7838 100644 --- a/lib/src/client_browser.dart +++ b/lib/src/client_browser.dart @@ -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': '12.0.0', + 'x-sdk-version': '12.1.0', 'X-Appwrite-Response-Format': '1.6.0', }; diff --git a/lib/src/client_io.dart b/lib/src/client_io.dart index 5ddcebde..eeae66f0 100644 --- a/lib/src/client_io.dart +++ b/lib/src/client_io.dart @@ -42,9 +42,9 @@ class ClientIO extends ClientBase with ClientMixin { 'x-sdk-name': 'Dart', 'x-sdk-platform': 'server', 'x-sdk-language': 'dart', - 'x-sdk-version': '12.0.0', + 'x-sdk-version': '12.1.0', 'user-agent': - 'AppwriteDartSDK/12.0.0 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})', + 'AppwriteDartSDK/12.1.0 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})', 'X-Appwrite-Response-Format': '1.6.0', }; diff --git a/pubspec.yaml b/pubspec.yaml index b47e0f3c..60a75d22 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: dart_appwrite -version: 12.0.0 +version: 12.1.0 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