UNPKG

stackpress

Version:

Incept is a content management framework.

34 lines (33 loc) 912 B
import type Engine from '@stackpress/inquire/Engine'; import type Model from '../schema/spec/Model'; import type Column from '../schema/spec/Column'; export type SearchParams = { q?: string; columns?: string[]; include?: string[]; filter?: Record<string, string | number | boolean>; span?: Record<string, (string | number | null | undefined)[]>; sort?: Record<string, any>; skip?: number; take?: number; total?: boolean; }; export type SearchJoin = { table: string; from: string; to: string; alias: string; }; export type SearchJoinMap = Record<string, SearchJoin>; export type SearchPath = { model: Model; column: Column; }; export type DatabaseConfig = { migrations: string; schema: { onDelete: 'CASCADE' | 'SET NULL' | 'RESTRICT'; onUpdate: 'CASCADE' | 'SET NULL' | 'RESTRICT'; }; }; export type DatabasePlugin = Engine;