import { IEntityRef } from './IEntityRef'; import { IPropertyRef } from './IPropertyRef'; import { LookupRegistry } from '../lib/LookupRegistry'; import { IClassRef } from './IClassRef'; import { ISchemaRef } from './ISchemaRef'; import { METADATA_TYPE } from '../lib/Constants'; export declare function isLookupRegistry(x: any): x is ILookupRegistry; /** * */ export interface ILookupRegistry { prepare?(): void; reload?(): void; ready?(timeout?: number): Promise; getSchemaRefs(filter?: (x: ISchemaRef) => boolean): (T | ISchemaRef)[]; getSchemaRefsFor(fn: string): (T | ISchemaRef); getSchemaRefsFor(fn: string | IEntityRef | IClassRef): T | ISchemaRef | (T | ISchemaRef)[]; getEntityRefFor(fn: string | object | Function, skipNsCheck?: boolean): (T | IEntityRef); getEntityRefs(filter?: (x: IEntityRef) => boolean): (T | IEntityRef)[]; getPropertyRefsFor(fn: string | object | Function): (T | IPropertyRef)[]; getPropertyRef(ref: IClassRef | IEntityRef, name: string): (T | IPropertyRef); getPropertyRefs(ref: IClassRef | IEntityRef): (T | IPropertyRef)[]; getLookupRegistry(): LookupRegistry; list(type: METADATA_TYPE, filter?: (x: any) => boolean): X[]; listEntities(filter?: (x: IEntityRef) => boolean): IEntityRef[]; listProperties(filter?: (x: IPropertyRef) => boolean): IPropertyRef[]; getClassRefFor(object: string | Function | IClassRef, type: METADATA_TYPE): IClassRef; create(context: string, options: any): T; /** * Add some entries of given context (mostly passing to same method of LookupRegistry) * * @param context * @param entry */ add(context: string, entry: T): T; /** * Remove some entries of given context by search critieria (mostly passing to same method of LookupRegistry) * * @param context * @param entry */ remove(context: string, search: any): T[]; /** * Filter some entries of given context by search critieria (mostly passing to same method of LookupRegistry) * * @param context * @param entry */ filter(context: string, search: any): T[]; /** * Find some entries of given context by search critieria (mostly passing to same method of LookupRegistry) * * @param context * @param entry */ find(context: string, search: any): T; /** * Reset registry data */ reset(): void; }