export interface CodeObject { name: string; type: string; fqid: string; children?: CodeObject[]; parent?: CodeObject; location?: string; static?: boolean; } export type Actor = { id: string; name: string; order: number; }; export declare enum NodeType { Loop = 1, Conditional = 2, Function = 3, ServerRPC = 4, ClientRPC = 5, Query = 6 } export declare enum DiffMode { Insert = 1, Delete = 2, Change = 3, Move = 4 } export type NodeIdentity = { name: string; actorId?: string; }; export type Action = Loop | FunctionCall | ServerRPC | ClientRPC | Query; export type ActionPredicate = (action: Action) => boolean; export type Node = { nodeType: NodeType; digest: string; subtreeDigest: string; parent?: Action; children: Action[]; diffMode?: DiffMode; elapsed?: number; formerName?: string; formerResult?: string; movedFrom?: NodeIdentity; eventIds: number[]; labels?: string[]; }; export type Loop = Node & { nodeType: NodeType.Loop; count: number; }; export type Type = { name: string; properties?: string[]; }; export type Message = Node; export type FunctionCall = Message & Node & { nodeType: NodeType.Function; caller?: Actor; callee: Actor; name: string; static: boolean; stableProperties: Record; returnValue?: ReturnValue; }; export type ServerRPC = Message & Node & { nodeType: NodeType.ServerRPC; callee: Actor; route: string; status: number; }; export type ClientRPC = Message & Node & { nodeType: NodeType.ClientRPC; caller: Actor; callee: Actor; route: string; status: number; }; export type Query = Message & Node & { nodeType: NodeType.Query; caller: Actor; callee: Actor; query: string; }; export type ReturnValue = { returnValueType?: Type; raisesException: boolean; }; export declare const isLoop: (action: Action) => action is Loop; export declare const isFunction: (action: Action) => action is FunctionCall; export declare const isServerRPC: (action: Action) => action is ServerRPC; export declare const isClientRPC: (action: Action) => action is ClientRPC; export declare const isQuery: (action: Action) => action is Query; export declare const actionActors: (action: Action | undefined) => (Actor | undefined)[]; export declare const nodeName: (action: Action | undefined) => string; export declare const qualifiedNodeName: (action: Action | undefined) => string; export declare const nodeIdentity: (action: Action) => NodeIdentity; export declare const sameNode: (a: NodeIdentity | undefined, b: NodeIdentity | undefined) => boolean; export declare const nodeResult: (action: Action | undefined) => string | undefined; export declare function parseRoute(route: string): { method: string; path?: string; }; export declare function setParent(action: Action, parent?: Action): void; export declare function findAncestor(action: Action, test: ActionPredicate): Action | undefined; export declare function hasAncestor(action: Action, test: ActionPredicate): boolean; export interface Diagram { actors: Actor[]; rootActions: Action[]; } export declare enum ValidationResult { Invalid = 0, Valid = 1, AppMap = 2 } import buildDiagram, { getActors } from './buildDiagram'; import buildDiffDiagram from './buildDiffDiagram'; import diff from './diff'; import unparseDiagram from './unparseDiagram'; import validateDiagram from './validateDiagram'; export { buildDiagram, buildDiffDiagram, diff, unparseDiagram, validateDiagram, getActors }; export declare enum FormatType { JSON = "json", PlantUML = "plantuml", Text = "text" } export declare const Formatters: FormatType[]; import format from './formatter'; export { format }; import type { SequenceDiagramOptions } from './specification'; import { default as Specification } from './specification'; import { DiffOptions, Diff, Move, MoveType, Position } from './diff'; export { SequenceDiagramOptions, Specification, DiffOptions, Diff, Move, MoveType, Position };