filterMaintenanceTasksByWithHttpInfo method

Future<Response> filterMaintenanceTasksByWithHttpInfo(
  1. FilterChain<MaintenanceTaskDto> filterChainMaintenanceTask, {
  2. String? startDocumentId,
  3. int? limit,
})

Filter maintenanceTasks for the current user (HcParty)

Returns a list of maintenanceTasks along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.

Note: This method returns the HTTP Response.

Parameters:

  • FilterChainMaintenanceTask filterChainMaintenanceTask (required):

  • String startDocumentId: A maintenanceTask document ID

  • int limit: Number of rows

Implementation

Future<Response> filterMaintenanceTasksByWithHttpInfo(FilterChain<MaintenanceTaskDto> filterChainMaintenanceTask, { String? startDocumentId, int? limit }) async {

  final path = r'/rest/v1/maintenancetask/filter';

  Object postBody = filterChainMaintenanceTask;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (startDocumentId != null) {
    queryParams.addAll(_queryParams('', 'startDocumentId', startDocumentId));
  }
  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }

  final contentTypes = <String>['application/json'];
  final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
  final authNames = <String>[r'basicSchema'];


  return await apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    nullableContentType,
    authNames,
  );
}