UNPKG

stackpress

Version:

Incept is a content management framework.

50 lines (49 loc) 1.36 kB
import type { NestedObject } from '@stackpress/lib'; import type { Data } from '@stackpress/idea-parser/types'; import type Column from './spec/Column.js'; import type Model from './spec/Model.js'; export type { EnumConfig, ModelConfig, TypeConfig, PropConfig, PluginConfig, SchemaConfig } from '@stackpress/idea-parser/types'; export type SchemaAssertion = { method: string; args: unknown[]; message: string | null; }; export type SchemaRelation = { local: string; foreign: string; name?: string; }; export type SchemaColumnInfo = { type: string; name: string; required: boolean; multiple: boolean; attributes: Record<string, unknown>; }; export type SchemaComponent = { component: string | false; method: string; args: Data[]; attributes: Record<string, Data>; }; export type SchemaColumnRelation = { model: Model; column: Column; key: Column; type: number; }; export type SchemaColumnRelationLink = { parent: SchemaColumnRelation; child: SchemaColumnRelation; }; export type SchemaSerialOptions = { bool?: boolean; date?: boolean; object?: boolean; }; export type ColumnOption = { name: string | false; attributes: Record<string, any>; }; export type ErrorList = (ErrorMap | null)[]; export type ErrorMap = NestedObject<string | string[] | ErrorList>;