UNPKG

stackpress

Version:

Incept is a content management framework.

40 lines (39 loc) 1.75 kB
import type { NestedObject } from '@stackpress/lib'; import type { SchemaColumnInfo, SchemaSerialOptions } from '../types'; import type Registry from '../Registry'; import Attributes from './Attributes'; import Column from './Column'; export default class Fieldset { readonly registry: Registry; readonly name: string; readonly attributes: Attributes; readonly columns: Map<string, Column>; get assertions(): Column[]; get camel(): string; get dash(): string; get encrypted(): Column[]; get defaults(): Record<string, any>; get enums(): Column[]; get fields(): Column[]; get fieldsets(): Column[]; get icon(): string | undefined; get label(): string[]; get lists(): Column[]; get lower(): string; get plural(): string; get singular(): string; get snake(): string; get template(): string | undefined; get title(): string; get views(): Column[]; constructor(registry: Registry, name: string, attributes: Record<string, unknown>, columns: SchemaColumnInfo[]); assert(values?: Record<string, any>, strict?: boolean): NestedObject<string | string[]> | null; column(name: string): Column | undefined; filter(values: Record<string, any>): Record<string, any>; fromSnake(name: string): Column | null; input(values: Record<string, any>, strict?: boolean): Record<string, any>; render(data: Record<string, any>): string; transformTemplate(to?: string): string; serialize(values: Record<string, any>, options?: SchemaSerialOptions, seed?: string): Record<string, string | number | boolean | Date | null | undefined>; unserialize(values: Record<string, any>, options?: SchemaSerialOptions, seed?: string): Record<string, any>; }