import 'reflect-metadata'; import type { Constructor } from '@cratis/fundamentals'; import type { ChroniclePropertyDecorator } from '../../../types/propertyDecoratorMetadata.js'; /** A graph of people and groups, declared fresh so each specification owns its classes. */ export interface Organization { readonly graphName: string; readonly Person: Constructor; readonly Group: Constructor; /** Person to Group, with the property since. */ readonly MemberOf: Constructor; /** Person to Person, a self edge, with the property since. */ readonly Knows: Constructor; /** The nodes and edges, to hand to discovery. */ readonly elements: Constructor[]; } /** * Declares a graph of people and groups. * @param graphName - The name of the graph. * @returns The classes of the graph. */ export declare function anOrganization(graphName: string): Organization; /** A member of a view: the name of the property and the decorator that declares it. */ export type ViewMember = readonly [property: string, decorator: ChroniclePropertyDecorator]; /** * Declares a view over a graph. * @param graphName - The name of the graph. * @param name - The name of the view, which is also the name of the class. * @param root - A function returning the class of the node the view is anchored at. * @param members - The members of the view, in declaration order. * @returns The class of the view. */ export declare function aView(graphName: string, name: string, root: () => Function, ...members: ViewMember[]): Constructor; /** * Discovers a graph with views, once. * @param organization - The graph. * @param views - The views. * @returns The discovered graphs. */ export declare function discoverViews(organization: Organization, ...views: Constructor[]): Promise; //# sourceMappingURL=a_graph_with_views.d.ts.map