import { ValueTypeOf } from '@elaraai/east'; import { NodeKindType as EastNodeKindType, LinkKindType as EastLinkKindType, OntologyType as EastOntologyType } from '@elaraai/e3-ui/internal'; /** JS string-union of every `NodeKindType` variant tag. */ export type OntologyNodeKind = ValueTypeOf['type']; /** JS string-union of every `LinkKindType` variant tag. */ export type OntologyLinkKind = ValueTypeOf['type']; /** JS-side shape of an `OntologyType` node carrier. */ export type OntologyNode = ValueTypeOf['nodes'][number]; /** JS-side shape of an `OntologyType` link carrier. */ export type OntologyLink = ValueTypeOf['links'][number]; /** JS-side shape of an `OntologyType` value. */ export type Ontology = ValueTypeOf; /** Flattened node — variant wrappers stripped to plain strings for the * layout + ReactFlow render path. `description` is `string | undefined` * (not optional) because `exactOptionalPropertyTypes` in tsconfig forbids * assigning `undefined` to an optional property. */ export interface FlatNode { id: string; name: string; description: string | undefined; nodeType: OntologyNodeKind; } /** Flattened link — kind unwrapped to a plain string. */ export interface FlatLink { id: string; source: string; target: string; linkType: OntologyLinkKind; } /** Strip the variant wrappers off an ontology value for layout / render. * Orphan links (source or target missing from the node set) are dropped. */ export declare function flattenOntology(ontology: Ontology): { nodes: FlatNode[]; links: FlatLink[]; }; /** * Default link kind for a `source → target` node-kind pair, or `null` if * no conventional relation exists. Typed as * `Record>` * — if `NodeKindType` or `LinkKindType` gains a tag, TS flags the missing * entries here. */ export declare const ValidLinks: Record>; /** All node kinds in display order. */ export declare const ALL_NODE_KINDS: OntologyNodeKind[]; //# sourceMappingURL=types.d.ts.map