getAllInboxes method

Future<PageInboxProjection?> getAllInboxes({
  1. int? page,
  2. int? size,
  3. String? sort,
  4. bool? favourite,
  5. String? search,
  6. String? tag,
  7. bool? teamAccess,
  8. DateTime? since,
  9. DateTime? before,
  10. String? inboxType,
  11. String? domainId,
})

List All Inboxes Paginated

List inboxes in paginated form. The results are available on the content property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative getInboxes method returns a full list of inboxes but is limited to 100 results.

Parameters:

  • int page: Optional page index in list pagination

  • int size: Optional page size in list pagination

  • String sort: Optional createdAt sort direction ASC or DESC

  • bool favourite: Optionally filter results for favourites only

  • String search: Optionally filter by search words partial matching ID, tags, name, and email address

  • String tag: Optionally filter by tags. Will return inboxes that include given tags

  • bool teamAccess: DEPRECATED. Optionally filter by team access.

  • DateTime since: Optional filter by created after given date time

  • DateTime before: Optional filter by created before given date time

  • String inboxType: Optional filter by inbox type

  • String domainId: Optional domain ID filter

Implementation

Future<PageInboxProjection?> getAllInboxes({ int? page, int? size, String? sort, bool? favourite, String? search, String? tag, bool? teamAccess, DateTime? since, DateTime? before, String? inboxType, String? domainId, }) async {
  final response = await getAllInboxesWithHttpInfo( page: page, size: size, sort: sort, favourite: favourite, search: search, tag: tag, teamAccess: teamAccess, since: since, before: before, inboxType: inboxType, domainId: domainId, );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PageInboxProjection',) as PageInboxProjection;

  }
  return null;
}