clean-jsdoc-theme TypeDoc APIv0.0.0

PaginatedResponse

interface PaginatedResponse<T> { data: T[]; meta?: ResponseMeta; pagination: PaginationMeta; success: true; }

Source: api.ts:251

Paginated API response

Type Parameters

  • T — Item type

Example

CODE
const response: PaginatedResponse<User> = {
  success: true,
  data: [user1, user2, user3],
  pagination: {
    page: 1,
    limit: 10,
    total: 100,
    totalPages: 10,
    hasNextPage: true,
    hasPreviousPage: false
  }
}

Properties

data: T[]

Array of items

meta: ResponseMeta

Additional metadata

pagination: PaginationMeta

Pagination metadata

success: true

Success flag