Select and Where types
SelectShape
Section titled “SelectShape”type SelectShape = { [field: string]: true | { as: string } | SelectShape; // nested relation};WhereShape
Section titled “WhereShape”type WhereShape = { [field: string]: | Value // implicit eq | Value[] // implicit in | { contains?: Value; gte?: Value; lte?: Value; ... }; // operators};OrderByShape
Section titled “OrderByShape”type OrderByShape = { [field: string]: "asc" | "desc";};CreateInput
Section titled “CreateInput”type CreateInput = { [field: string]: Value; // Fields with .autoCreate() are excluded // Many-to-many relations passed as array of IDs or objects [relation: string]: ID[] | JunctionData[];};UpdateInput
Section titled “UpdateInput”type UpdateInput = { [field: string]: Value; // Many-to-many relations passed as array of IDs (replaces all)};CursorOptions
Section titled “CursorOptions”type CursorOptions = { select?: SelectShape; where?: WhereShape; orderBy: OrderByShape; // required after?: string; limit: number; // required};PaginationOptions
Section titled “PaginationOptions”type PaginationOptions = { page: number; perPage: number;};.get() also accepts limit and offset as direct options for simple pagination without using pagination.
const { data } = await jsorm.users.get({ limit: 10, offset: 20 });