Skip to content

OrderByCheck

OrderByCheck = { ok: true; sort: SortSpec; } | { errors: FilterError[]; ok: false; }

Defined in: packages/schema/src/filter/order-by.ts:26

What checkOrderBy gives: the sort, or the errors.

{ ok: true; sort: SortSpec; }

ok: true

The order is valid for the resource.

sort: SortSpec

The fields to sort on and their directions, in order.


{ errors: FilterError[]; ok: false; }

errors: FilterError[]

Each problem, with where it is in the text.

ok: false

The order is not valid for the resource.