1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

fix(after-pagination): updated descriptions

This commit is contained in:
Torsten Dittmann 2021-08-11 15:30:25 +02:00
parent 7aa712ed7c
commit 1061dc6366
6 changed files with 19 additions and 19 deletions

View file

@ -182,7 +182,7 @@ App::get('/v1/database/collections')
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
->param('offset', 0, new Range(0, 40000), 'Results offset. The default value is 0. Use this param to manage pagination.', true)
->param('after', '', new UID(), 'ID of the collection used to return collection listed after. Should be used for efficient pagination working with many collections.', true)
->param('after', '', new UID(), 'ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.', true)
->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true)
->inject('response')
->inject('dbForExternal')
@ -196,7 +196,7 @@ App::get('/v1/database/collections')
$afterCollection = $dbForExternal->getDocument('collections', $after);
if ($afterCollection->isEmpty()) {
throw new Exception('Collection for after not found', 400);
throw new Exception("Collection '{$after}' for the 'after' value not found.", 400);
}
}
@ -1068,7 +1068,7 @@ App::get('/v1/database/collections/:collectionId/documents')
->param('queries', [], new ArrayList(new Text(128)), 'Array of query strings.', true)
->param('limit', 25, new Range(0, 100), 'Maximum number of documents to return in response. Use this value to manage pagination. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
->param('offset', 0, new Range(0, 900000000), 'Offset value. The default value is 0. Use this param to manage pagination.', true)
->param('after', '', new UID(), 'ID of the document used to return documents listed after. Should be used for efficient pagination working with many documents.', true)
->param('after', '', new UID(), 'ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data.', true)
->param('orderAttributes', [], new ArrayList(new Text(128)), 'Array of attributes used to sort results.', true)
->param('orderTypes', [], new ArrayList(new WhiteList(['DESC', 'ASC'], true)), 'Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.', true)
->inject('response')
@ -1103,7 +1103,7 @@ App::get('/v1/database/collections/:collectionId/documents')
$afterDocument = $dbForExternal->getDocument($collectionId, $after);
if ($afterDocument->isEmpty()) {
throw new Exception('Document for orderAfter not found', 400);
throw new Exception("Document '{$after}' for the 'after' value not found.", 400);
}
}

View file

@ -88,7 +88,7 @@ App::get('/v1/functions')
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true)
->param('after', '', new UID(), 'ID of the function used to return functions listed after. Should be used for efficient pagination working with many functions.', true)
->param('after', '', new UID(), 'ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data.', true)
->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true)
->inject('response')
->inject('dbForInternal')
@ -102,7 +102,7 @@ App::get('/v1/functions')
$afterFunction = $dbForInternal->getDocument('functions', $after);
if ($afterFunction->isEmpty()) {
throw new Exception('Function for after not found', 400);
throw new Exception("Function '{$after}' for the 'after' value not found.", 400);
}
}
@ -515,7 +515,7 @@ App::get('/v1/functions/:functionId/tags')
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true)
->param('after', '', new UID(), 'ID of the tag used to return tags listed after. Should be used for efficient pagination working with many tags.', true)
->param('after', '', new UID(), 'ID of the tag used as the starting point for the query, excluding the tag itself. Should be used for efficient pagination when working with large sets of data.', true)
->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true)
->inject('response')
->inject('dbForInternal')
@ -535,7 +535,7 @@ App::get('/v1/functions/:functionId/tags')
$afterTag = $dbForInternal->getDocument('tags', $after);
if ($afterTag->isEmpty()) {
throw new Exception('Tag for after not found', 400);
throw new Exception("Tag '{$after}' for the 'after' value not found.", 400);
}
}
@ -766,7 +766,7 @@ App::get('/v1/functions/:functionId/executions')
->param('functionId', '', new UID(), 'Function unique ID.')
->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true)
->param('after', '', new UID(), 'ID of the execution used to return executions listed after. Should be used for efficient pagination working with many executions.', true)
->param('after', '', new UID(), 'ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data.', true)
->inject('response')
->inject('dbForInternal')
->action(function ($functionId, $limit, $offset, $after, $response, $dbForInternal) {
@ -785,7 +785,7 @@ App::get('/v1/functions/:functionId/executions')
$afterExecution = $dbForInternal->getDocument('executions', $after);
if ($afterExecution->isEmpty()) {
throw new Exception('Execution for after not found', 400);
throw new Exception("Execution '{$after}' for the 'after' value not found.", 400);
}
}

View file

@ -164,7 +164,7 @@ App::get('/v1/projects')
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true)
->param('after', '', new UID(), 'ID of the project used to return projects listed after. Should be used for efficient pagination working with many projects.', true)
->param('after', '', new UID(), 'ID of the project used as the starting point for the query, excluding the project itself. Should be used for efficient pagination when working with large sets of data.', true)
->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true)
->inject('response')
->inject('dbForConsole')
@ -178,7 +178,7 @@ App::get('/v1/projects')
$afterProject = $dbForConsole->getDocument('projects', $after);
if ($afterProject->isEmpty()) {
throw new Exception('Project for after not found', 400);
throw new Exception("Project '{$after}' for the 'after' value not found.", 400);
}
}

View file

@ -171,7 +171,7 @@ App::get('/v1/storage/files')
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true)
->param('after', '', new UID(), 'ID of the file used to return files listed after. Should be used for efficient pagination working with many files.', true)
->param('after', '', new UID(), 'ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data.', true)
->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true)
->inject('response')
->inject('dbForInternal')
@ -185,7 +185,7 @@ App::get('/v1/storage/files')
$afterFile = $dbForInternal->getDocument('files', $after);
if ($afterFile->isEmpty()) {
throw new Exception('File for after not found', 400);
throw new Exception("File '{$after}' for the 'after' value not found.", 400);
}
}

View file

@ -99,7 +99,7 @@ App::get('/v1/teams')
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true)
->param('after', '', new UID(), 'ID of the team used to return teams listed after. Should be used for efficient pagination working with many teams.', true)
->param('after', '', new UID(), 'ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data.', true)
->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true)
->inject('response')
->inject('dbForInternal')
@ -113,7 +113,7 @@ App::get('/v1/teams')
$afterTeam = $dbForInternal->getDocument('teams', $after);
if ($afterTeam->isEmpty()) {
throw new Exception('Team for after not found', 400);
throw new Exception("Team '{$after}' for the 'after' value not found.", 400);
}
}
@ -424,7 +424,7 @@ App::get('/v1/teams/:teamId/memberships')
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true)
->param('after', '', new UID(), 'ID of the file used to return files listed after. Should be used for efficient pagination working with many files.', true)
->param('after', '', new UID(), 'ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data.', true)
->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true)
->inject('response')
->inject('dbForInternal')
@ -442,7 +442,7 @@ App::get('/v1/teams/:teamId/memberships')
$afterMembership = $dbForInternal->getDocument('memberships', $after);
if ($afterMembership->isEmpty()) {
throw new Exception('Membership for after not found', 400);
throw new Exception("Membership '{$after}' for the 'after' value not found.", 400);
}
}

View file

@ -83,7 +83,7 @@ App::get('/v1/users')
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true)
->param('after', '', new UID(), 'ID of the user used to return users listed after. Should be used for efficient pagination working with many users.', true)
->param('after', '', new UID(), 'ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data.', true)
->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true)
->inject('response')
->inject('dbForInternal')