import { BaseAdjacencies, } from '../ontology/BaseAdjacencies'; import { ContainmentTypes, } from './ContainmentTypes'; import { FindAdjacencyArgs, IFindBaseArgs, FindAdjacencyArg, } from '../querying/FindModelArgs'; import { IModel, } from '../models/IModel'; import { IRelation, } from './IRelation'; import { ISerializedAdjacencyRelation, } from './ISerializedAdjacencyRelation'; import { ModelType, } from '../models/ModelType'; import { OnticTypes, } from '../ontology/OnticTypes'; export interface IAdjacencyRelation< Type extends OnticTypes, Being extends OnticTypes, T extends IAdjacencyRelation, > extends IRelation { readonly modelType: Type; readonly neighbors: Readonly< Map[]> >; readonly addNeighbor: ( adjacency: T, model: IModel, ) => void; readonly clone: (self: T) => T; readonly destroy: (self: T) => void; readonly find: ( args: string | FindAdjacencyArg | (IFindBaseArgs & FindAdjacencyArgs), ) => IModel | null; readonly findAll: ( args: '*' | FindAdjacencyArg | (IFindBaseArgs & FindAdjacencyArgs), ) => readonly IModel[]; readonly findAllGenerator: ( args: '*' | FindAdjacencyArg | IFindBaseArgs & FindAdjacencyArgs, ) => IterableIterator>; readonly removeNeighbor: ( adjacency: T, model: IModel, ) => void; readonly serialize: ( self: T, spaces?: number, ) => string; readonly serializeToObject: (self: T) => ISerializedAdjacencyRelation; }