getFrameworkByDoctypeWithHttpInfo method

Future<Response> getFrameworkByDoctypeWithHttpInfo(
  1. String doctype, {
  2. String? filters,
  3. String? fields,
  4. String? orderBy,
  5. String? limit,
})

Returns the caller org's documents of one DocType, filtered, ordered and projected by the query.

Returns the caller org's documents of one DocType, filtered, ordered and projected by the query. The DocType is resolved FIRST — through the same permission gate the list itself uses — because the query is validated against its schema: a filter, sort or field name the DocType does not declare is refused rather than reaching the store.

Note: This method returns the HTTP Response.

Parameters:

  • String doctype (required): DocType is the DocType to list, from the path.

  • String filters: Filters is a JSON object of equality matches, e.g. {"priority":"High"}. Every key must be a field the DocType declares (or the managed name / docstatus); an undeclared one is refused rather than silently ignored.

  • String fields: Fields projects the response to a subset — a JSON array \"a\",\"b\" or a comma list "a,b". The envelope keys are always returned.

  • String orderBy: OrderBy is "

  • String limit: Limit caps the rows returned. Anything that is not a positive integer leaves the engine's default in place.

Implementation

Future<Response> getFrameworkByDoctypeWithHttpInfo(String doctype, { String? filters, String? fields, String? orderBy, String? limit, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/framework/{doctype}'
    .replaceAll('{doctype}', doctype);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (filters != null) {
    queryParams.addAll(_queryParams('', 'filters', filters));
  }
  if (fields != null) {
    queryParams.addAll(_queryParams('', 'fields', fields));
  }
  if (orderBy != null) {
    queryParams.addAll(_queryParams('', 'order_by', orderBy));
  }
  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}