interface

ListOptions

Typed filtering, projection, population, sorting, pagination, locale, and trash options.

Properties

PropertyTypeDescription
draftDrafts extends true ? boolean : falseSelect the authorized working draft rather than the public published snapshot.
pagenumberThe page value.
limitnumberThe limit value.
paginationbooleanSet false to skip counting every match. The page then has no totalDocs or totalPages; hasNextPage stays exact. Defaults to true.
depthnumberThe depth value.
whereWhereThe where value.
selectSelectThe select value.
populatePopulateThe populate value.
sortreadonly string[]The sort value.
trashbooleanThe trash value.
includeAccessbooleanInclude collection and per-document access capabilities for this page.
locale[Locale] extends [never] ? never : "all" | LocaleContent locale. Use "all" to receive locale-keyed localized fields.
fallbackLocale[Locale] extends [never] ? never : false | Locale | readonly Locale[]Explicit fallback chain, or false to require an exact locale value.
signalAbortSignalThe signal value.
headersHeadersInit | undefinedThe headers value.
keepalivebooleanThe 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, > { ... }

Source packages/sdk/src/index.ts:50