← @mortar-kit/core

ListOptionsinterface

import { ListOptions } from '@mortar-kit/core'

interface ListOptions

Options for listing documents. Plain JSON, so they can cross a server function.

Properties

where?: Record<string, string | number | boolean>

Keep documents whose id, slug or top-level field equals each value.

sort?: SortOrder<string>

Order. Defaults to the collection's manual order when it is orderable, otherwise its sort; ties are ordered by slug.

limit?: number

At most this many documents: an integer from 1 to 100.