UNPKG

@reactodia/workspace

Version:

Reactodia Workspace -- library for visual interaction with graphs in a form of a diagram.

31 lines 1.18 kB
import type { AuthoringState } from '../editor/authoringState'; import type { DataGraphStructure } from '../editor/dataDiagramModel'; import type { ElementModel, ElementIri, LinkKey, LinkModel, PropertyTypeIri } from './model'; export interface ValidationEvent { readonly target: ElementModel; readonly outboundLinks: ReadonlyArray<LinkModel>; readonly graph: DataGraphStructure; readonly state: AuthoringState; readonly signal: AbortSignal | undefined; } export interface ValidationResult { readonly items: ReadonlyArray<ValidatedElement | ValidatedLink>; } export interface ValidatedElement { readonly type: 'element'; readonly target: ElementIri; readonly severity: ValidationSeverity; readonly message: string; readonly propertyType?: PropertyTypeIri; } export interface ValidatedLink { readonly type: 'link'; readonly target: LinkKey; readonly severity: ValidationSeverity; readonly message: string; } export type ValidationSeverity = 'info' | 'warning' | 'error'; export interface ValidationProvider { validate(e: ValidationEvent): Promise<ValidationResult>; } //# sourceMappingURL=validationProvider.d.ts.map