getPagesPublicWithHttpInfo method

Future<Response> getPagesPublicWithHttpInfo(
  1. String tenantId, {
  2. String? cursor,
  3. int? limit,
  4. String? q,
  5. PagesSortBy? sortBy,
  6. bool? hasComments,
})

List pages for a tenant. Used by the FChat desktop client to populate its room list. Requires enableFChat to be true on the resolved custom config for each page. Pages that require SSO are filtered against the requesting user's group access.

Note: This method returns the HTTP Response.

Parameters:

  • String tenantId (required):

  • String cursor: Opaque pagination cursor returned as nextCursor from a prior request. Tied to the same sortBy.

  • int limit: 1..200, default 50

  • String q: Optional case-insensitive title prefix filter.

  • PagesSortBy sortBy: Sort order. updatedAt (default, newest first), commentCount (most comments first), or title (alphabetical).

  • bool hasComments: If true, only return pages with at least one comment.

Implementation

Future<Response> getPagesPublicWithHttpInfo(String tenantId, { String? cursor, int? limit, String? q, PagesSortBy? sortBy, bool? hasComments, }) async {
  // ignore: prefer_const_declarations
  final path = r'/pages/{tenantId}'
    .replaceAll('{tenantId}', tenantId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (cursor != null) {
    queryParams.addAll(_queryParams('', 'cursor', cursor));
  }
  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }
  if (q != null) {
    queryParams.addAll(_queryParams('', 'q', q));
  }
  if (sortBy != null) {
    queryParams.addAll(_queryParams('', 'sortBy', sortBy));
  }
  if (hasComments != null) {
    queryParams.addAll(_queryParams('', 'hasComments', hasComments));
  }

  const contentTypes = <String>[];


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