QueryParams
interface QueryParams<T> extends module:types/api.PaginationParams {
cursor?: string;
fields?: (keyof T)[];
filters?: FilterParam<T>[];
include?: string[];
limit?: number;
page?: number;
search?: string;
sort?: SortParam<T>[];
}Source: api.ts:335
Query parameters for list endpoints
Type Parameters
T— Item type
Example
CODE
const query: QueryParams<User> = {
page: 1,
limit: 20,
sort: [{ field: 'createdAt', order: 'desc' }],
filters: [{ field: 'status', operator: 'eq', value: 'active' }],
search: 'john'
}Hierarchy
PaginationParamsQueryParams
Properties
cursor: string
Inherited from cursor
Cursor for cursor-based pagination
fields: (keyof T)[]
Fields to include in response
filters: FilterParam<T>[]
Filter parameters
include: string[]
Relations to include
limit: number
Inherited from limit
Items per page
page: number
Inherited from page
Page number (1-indexed)
search: string
Full-text search query
sort: SortParam<T>[]
Sort parameters