import "../index"; import { PredicateParser } from "../predicate_parser"; import { AllDataFields } from "./field_types"; import { NarwhalSchema } from "./NarwhalSchema"; import { ConcreteProxiedCollection, ProxiedCollection } from "./proxied_collection"; import { XOR } from "./utils"; export declare function mapObjectToClass(object: any, factory: any, context: any, parentSchema: any, diffComparison?: {}): { [key: string]: T; }; export interface INarwhalSchemaParams { concrete?: boolean; singleton?: boolean; composed_of?: string[]; adds_to?: string; enumerators?: IEnumShape; populations?: IPopShape; participation_population?: string; settings?: { [key: string]: any; }; persisted_data: { [key: string]: AllDataFields; }; computed_data?: { [key: string]: { get: string; set?: string; }; }; static_methods?: { [key: string]: string; }; } export interface IEnumShape { [enumType: string]: { collectionName?: string; options: { [enumKey: string]: { humanReadable: string; optionName?: string; metadata?: { [key: string]: any; }; }; }; }; } interface IPopSamplingRatio { sample: number; } interface IPopSamplingPredicate { sample: IsParsed extends false ? string : (target: any, as_promise: boolean) => boolean | Promise; } export interface IPopShape { [popName: string]: { name: string; membership: IsParsed extends false ? string : (target: any) => boolean | Promise; } & (IsParsed extends false ? XOR> : IPopSamplingPredicate); } export interface ISystemContextComponent { context(): { [key: string]: any; }; } export declare class NarwhalSchemaContext { get context(): any; schema_namespaces: { [key: string]: { [key: string]: NarwhalSchema; }; }; collection_namespaces: { [key: string]: { [key: string]: ConcreteProxiedCollection; }; }; isClosed: boolean; non_concrete_collection_namespaces: { [key: string]: { [key: string]: ProxiedCollection; }; }; predicateParser: PredicateParser; private db; private schemaFactory; private concreteProxiedCollectionFactory; private proxiedCollectionFactory; private contextComponents; private errorAggregator; private userManager; private logManager; private _logger; private get logger(); addSchema({ namespace, version, name, parent, schema }: { namespace: string; version: number; name: string; parent?: string; schema: INarwhalSchemaParams; }): void; resolveSchemaByName(name: string, currentnamespace?: string): NarwhalSchema; resolveCollectionByName(name: string, currentnamespace?: string): ConcreteProxiedCollection; getSchemasThatAddTo(name: string, currentnamespace?: string): NarwhalSchema[]; getEnumeratorByPath(path: any): { collectionName?: string; options: { [enumKey: string]: { humanReadable: string; optionName?: string; metadata?: { [key: string]: any; }; }; }; }; close(): Promise; private resolveByName; } export {};