Skip to content

Commit 67457d5

Browse files
fix params default values
1 parent 6296196 commit 67457d5

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

lib/services/database.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ class Database extends Service {
1111
/// of the project's documents. [Learn more about different API
1212
/// modes](/docs/admin).
1313
///
14-
Future<Response> listDocuments({required String collectionId, List? filters, int? limit, int? offset, String? orderField, OrderType orderType = OrderType.asc, String? orderCast, String? search}) {
14+
Future<Response> listDocuments({required String collectionId, List? filters, int? limit, int? offset, String? orderField, OrderType? orderType, String? orderCast, String? search}) {
1515
final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId);
1616

1717
final Map<String, dynamic> params = {
1818
'filters': filters,
1919
'limit': limit,
2020
'offset': offset,
2121
'orderField': orderField,
22-
'orderType': orderType.name(),
22+
'orderType': orderType?.name(),
2323
'orderCast': orderCast,
2424
'search': search,
2525
};

lib/services/functions.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ class Functions extends Service {
1111
/// return a list of all of the project's executions. [Learn more about
1212
/// different API modes](/docs/admin).
1313
///
14-
Future<Response> listExecutions({required String functionId, String? search, int? limit, int? offset, OrderType orderType = OrderType.asc}) {
14+
Future<Response> listExecutions({required String functionId, String? search, int? limit, int? offset, OrderType? orderType}) {
1515
final String path = '/functions/{functionId}/executions'.replaceAll(RegExp('{functionId}'), functionId);
1616

1717
final Map<String, dynamic> params = {
1818
'search': search,
1919
'limit': limit,
2020
'offset': offset,
21-
'orderType': orderType.name(),
21+
'orderType': orderType?.name(),
2222
};
2323

2424
final Map<String, String> headers = {

lib/services/storage.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ class Storage extends Service {
1010
/// your results. On admin mode, this endpoint will return a list of all of the
1111
/// project's files. [Learn more about different API modes](/docs/admin).
1212
///
13-
Future<Response> listFiles({String? search, int? limit, int? offset, OrderType orderType = OrderType.asc}) {
13+
Future<Response> listFiles({String? search, int? limit, int? offset, OrderType? orderType}) {
1414
final String path = '/storage/files';
1515

1616
final Map<String, dynamic> params = {
1717
'search': search,
1818
'limit': limit,
1919
'offset': offset,
20-
'orderType': orderType.name(),
20+
'orderType': orderType?.name(),
2121
};
2222

2323
final Map<String, String> headers = {

lib/services/teams.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ class Teams extends Service {
1111
/// of the project's teams. [Learn more about different API
1212
/// modes](/docs/admin).
1313
///
14-
Future<Response> list({String? search, int? limit, int? offset, OrderType orderType = OrderType.asc}) {
14+
Future<Response> list({String? search, int? limit, int? offset, OrderType? orderType}) {
1515
final String path = '/teams';
1616

1717
final Map<String, dynamic> params = {
1818
'search': search,
1919
'limit': limit,
2020
'offset': offset,
21-
'orderType': orderType.name(),
21+
'orderType': orderType?.name(),
2222
};
2323

2424
final Map<String, String> headers = {
@@ -110,14 +110,14 @@ class Teams extends Service {
110110
/// Get a team members by the team unique ID. All team members have read access
111111
/// for this list of resources.
112112
///
113-
Future<Response> getMemberships({required String teamId, String? search, int? limit, int? offset, OrderType orderType = OrderType.asc}) {
113+
Future<Response> getMemberships({required String teamId, String? search, int? limit, int? offset, OrderType? orderType}) {
114114
final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId);
115115

116116
final Map<String, dynamic> params = {
117117
'search': search,
118118
'limit': limit,
119119
'offset': offset,
120-
'orderType': orderType.name(),
120+
'orderType': orderType?.name(),
121121
};
122122

123123
final Map<String, String> headers = {

0 commit comments

Comments
 (0)