interface Query<T, U> {
    amount?: number;
    fields?: (keyof T)[];
    filter?: RecursivePartial<T>;
    orderBy?: [Extract<keyof T, U>, "desc" | "asc"];
    page?: number;
}

Type Parameters

  • T
  • U

Hierarchy (view full)

Properties

amount?: number

Amount of items will return.

fields?: (keyof T)[]

Array of field names.

Filter object.

orderBy?: [Extract<keyof T, U>, "desc" | "asc"]

Tuple with a field and an order

page?: number

Page of list starting from 1