import type { Component, AsyncComponentLoader } from 'vue'; import type { Resolver } from '../form/fields'; declare type PossiblyAsyncComponent = Component | AsyncComponentLoader; export interface IField { label?: string; key?: string; hidden?: boolean; type?: string; default?: unknown; props?: Record; createProps?: Record; updateProps?: Record; createOnly?: boolean; updateOnly?: boolean; } export interface IView { type?: string; title?: string; filters?: IField[]; staticFilters?: Record; include?: string[]; query?: Record; props?: Record; perPage?: number; perPageOptions?: number[]; } export interface IForm { fields: IField[]; layout?: PossiblyAsyncComponent; include?: string[]; query?: Record; inlineRelated?: string[]; } export interface IEntityMeta { itemUrlKey?: string; title?: string; apiType?: string; apiEndpoint: string; views: Record; form?: IForm; createButtonText?: string; createPageTitle?: string; editPageTitle?: string; deleteDisabled?: boolean; createDisabled?: boolean; updateDisabled?: boolean; } export declare const entityMetaDefaults: Partial; export declare const viewDefaults: Partial; export declare const fieldDefaults: Partial; export declare const formDefaults: Partial; export interface IViewType { component: PossiblyAsyncComponent; } export interface IDisplayType { component: PossiblyAsyncComponent; } export interface IFieldType { component: PossiblyAsyncComponent; } export interface IRegisteredEntity extends Required { slug: string; views: Record[]; }>>; form: Required & { fields: Required[]; }; } export default class EntityManager { protected entities: Record; protected viewTypes: Record; protected displayTypes: Record; protected fieldTypes: Record; readonly formFieldsResolver: Resolver; registerEntity(slug: string, entity: IEntityMeta): this; getEntity(key: string): IRegisteredEntity | null; registerViewType(key: string, view: IViewType): this; getViewType(key: string): IViewType | null; registerDisplayType(key: string, display: IDisplayType): this; getDisplayType(key: string): IDisplayType | null; constructor(); } export {};