import { Cardinality, RelationKey, RelationName, State, Type } from '../interfaces'; import { Schema, EntitySchema, RelationSchema } from './schema'; interface RelationDefinition { type: Type; relationKey: RelationKey; relatedType: Type; relationName: RelationName; cardinality: Cardinality; reciprocalKey: RelationKey; reciprocalCardinality: Cardinality; } export declare class Entities { schema: Schema; entities: { [t in Type]: Entity; }; constructor(schema: Schema); hasEntity(type: Type): boolean; getEntity(type: Type): Entity; getTypes(): Type[]; getEmptyState(): State; } export declare class Entity { type: Type; schema: EntitySchema; entities: Entities; constructor(type: Type, schema: EntitySchema, entities: Entities); private schemaEntries; getRelationSchema(relationKey: RelationKey): RelationSchema; hasRelationKey(relationKey: RelationKey): boolean; getManyRelationKeys(): string[]; getOneRelationKeys(): string[]; getRelationKey(relation: RelationKey | RelationName): RelationKey; getRelationName(relationKey: RelationKey): RelationName; hasRelation(relation: RelationName | RelationKey): boolean; getReciprocalKey(relationKey: RelationKey): RelationKey; getRelationDefinition(relationKey: RelationKey): RelationDefinition; getManyRelationDefinitions(): RelationDefinition[]; getOneRelationDefinitions(): RelationDefinition[]; getRelationType(relationKey: RelationKey): Type; getCardinality(relationKey: RelationKey): Cardinality; getOwnReciprocalCardinality(relation: RelationKey): Cardinality; getRelatedReciprocalKey(relationKey: RelationKey): RelationKey; getRelatedReciprocalCardinality(relation: RelationKey): Cardinality; private errorRelationKeyDoesNotExist; errorRelationDoesNotExist(relation: RelationName | RelationKey): void; } export {};