Skip to content

SearchesOfModel

SearchesOfModel = object

Defined in: packages/schema/src/model.ts:538

What a saved search is (.searchesOf(...)): the list page shows each of the user’s searches, with its filters, its controls, and the first records of resource it finds, newest first, and a link to all of them. See Saved searches.

optional controls?: string[]

Defined in: packages/schema/src/model.ts:546

Enum and boolean fields changed in place on each search, such as how often to hear of new records.


filter: string

Defined in: packages/schema/src/model.ts:542

The text field holding the search’s filter, as the list’s address has it.


optional limit?: number

Defined in: packages/schema/src/model.ts:559

How many records each search shows at most; default every one it finds, loaded as its row scrolls.


optional name?: string

Defined in: packages/schema/src/model.ts:544

The text field holding the name the user gives a search, if any; without one, the search’s filters are its title.


resource: string

Defined in: packages/schema/src/model.ts:540

The resource searched, such as listings.


optional unseen?: object

Defined in: packages/schema/src/model.ts:552

With it, each search shows its records newest first by field (of resource) and marks those new to the user: those whose field is after the search’s seenAt (a timestamp field of this resource), which opening all of its results sets to now.

field: string

The searched resource’s timestamp that makes a record new, such as when it was published.

seenAt: string

When the user last opened the search’s results.