interface
ListOptions
Typed filtering, projection, population, sorting, pagination, locale, and trash options.
Properties
| Property | Type | Description |
|---|---|---|
draft | Drafts extends true ? boolean : false | Select the authorized working draft rather than the public published snapshot. |
page | number | The page value. |
limit | number | The limit value. |
pagination | boolean | Set false to skip counting every match. The page then has no totalDocs or totalPages;
hasNextPage stays exact. Defaults to true. |
depth | number | The depth value. |
where | Where | The where value. |
select | Select | The select value. |
populate | Populate | The populate value. |
sort | readonly string[] | The sort value. |
trash | boolean | The trash value. |
includeAccess | boolean | Include collection and per-document access capabilities for this page. |
locale | [Locale] extends [never] ? never : "all" | | Content locale. Use "all" to receive locale-keyed localized fields. |
fallbackLocale | [Locale] extends [never] ? never : false | | Explicit fallback chain, or false to require an exact locale value. |
signal | AbortSignal | The signal value. |
headers | HeadersInit | | The headers value. |
keepalive | boolean | The keepalive value. |
How it works
Prefix a sort field with - for descending order. where, select, and populate are generated per collection.
Full signature
interface ListOptions<
Where,
Select,
Populate,
Locale extends string = string,
Drafts extends boolean = boolean,
> { ... }