diff --git a/lib/services/database.dart b/lib/services/database.dart index 7b75f1c..1fd7b48 100644 --- a/lib/services/database.dart +++ b/lib/services/database.dart @@ -11,7 +11,7 @@ class Database extends Service { /// of the project's documents. [Learn more about different API /// modes](/docs/admin). /// - Future listDocuments({required String collectionId, List? filters, int? limit, int? offset, String? orderField, OrderType orderType = OrderType.asc, String? orderCast, String? search}) { + Future listDocuments({required String collectionId, List? filters, int? limit, int? offset, String? orderField, OrderType? orderType, String? orderCast, String? search}) { final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); final Map params = { @@ -19,7 +19,7 @@ class Database extends Service { 'limit': limit, 'offset': offset, 'orderField': orderField, - 'orderType': orderType.name(), + 'orderType': orderType?.name(), 'orderCast': orderCast, 'search': search, }; diff --git a/lib/services/functions.dart b/lib/services/functions.dart index 53a2817..30bec0e 100644 --- a/lib/services/functions.dart +++ b/lib/services/functions.dart @@ -11,14 +11,14 @@ class Functions extends Service { /// return a list of all of the project's executions. [Learn more about /// different API modes](/docs/admin). /// - Future listExecutions({required String functionId, String? search, int? limit, int? offset, OrderType orderType = OrderType.asc}) { + Future listExecutions({required String functionId, String? search, int? limit, int? offset, OrderType? orderType}) { final String path = '/functions/{functionId}/executions'.replaceAll(RegExp('{functionId}'), functionId); final Map params = { 'search': search, 'limit': limit, 'offset': offset, - 'orderType': orderType.name(), + 'orderType': orderType?.name(), }; final Map headers = { diff --git a/lib/services/storage.dart b/lib/services/storage.dart index 7986721..d03cb0b 100644 --- a/lib/services/storage.dart +++ b/lib/services/storage.dart @@ -10,14 +10,14 @@ class Storage extends Service { /// your results. On admin mode, this endpoint will return a list of all of the /// project's files. [Learn more about different API modes](/docs/admin). /// - Future listFiles({String? search, int? limit, int? offset, OrderType orderType = OrderType.asc}) { + Future listFiles({String? search, int? limit, int? offset, OrderType? orderType}) { final String path = '/storage/files'; final Map params = { 'search': search, 'limit': limit, 'offset': offset, - 'orderType': orderType.name(), + 'orderType': orderType?.name(), }; final Map headers = { diff --git a/lib/services/teams.dart b/lib/services/teams.dart index aa5183b..913ed3d 100644 --- a/lib/services/teams.dart +++ b/lib/services/teams.dart @@ -11,14 +11,14 @@ class Teams extends Service { /// of the project's teams. [Learn more about different API /// modes](/docs/admin). /// - Future list({String? search, int? limit, int? offset, OrderType orderType = OrderType.asc}) { + Future list({String? search, int? limit, int? offset, OrderType? orderType}) { final String path = '/teams'; final Map params = { 'search': search, 'limit': limit, 'offset': offset, - 'orderType': orderType.name(), + 'orderType': orderType?.name(), }; final Map headers = { @@ -110,14 +110,14 @@ class Teams extends Service { /// Get a team members by the team unique ID. All team members have read access /// for this list of resources. /// - Future getMemberships({required String teamId, String? search, int? limit, int? offset, OrderType orderType = OrderType.asc}) { + Future getMemberships({required String teamId, String? search, int? limit, int? offset, OrderType? orderType}) { final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); final Map params = { 'search': search, 'limit': limit, 'offset': offset, - 'orderType': orderType.name(), + 'orderType': orderType?.name(), }; final Map headers = {