/** * Journey Diagram Wrapper Class * * A unified API for building, mutating, and querying journey diagrams. * Provides a fluent interface that wraps the JourneyAST. */ import { DiagramWrapper } from './diagram-wrapper.js'; import type { JourneyAST, JourneySection, JourneyTask } from './types/journey.js'; import type { RenderOptions } from './types/render-options.js'; /** * Options for adding a task */ export interface AddJourneyTaskOptions { /** Score (1-5, default: 5) */ score?: number; /** Actors involved */ actors?: string[]; } /** * Query options for finding tasks */ export interface FindJourneyTasksQuery { /** Find tasks in this section */ section?: string; /** Find tasks with this score */ score?: number; /** Find tasks with score >= this value */ minScore?: number; /** Find tasks with score <= this value */ maxScore?: number; /** Find tasks involving this actor */ actor?: string; /** Find tasks whose name contains this string */ nameContains?: string; } /** * A fluent wrapper for JourneyAST that supports building, mutating, and querying. */ export declare class Journey extends DiagramWrapper { private constructor(); /** * Create a new empty journey diagram */ static create(title?: string): Journey; /** * Create a Journey wrapper from an existing AST */ static from(ast: JourneyAST): Journey; /** * Parse Mermaid syntax and create a Journey wrapper */ static parse(text: string): Journey; /** * Render to Mermaid syntax */ render(options?: RenderOptions): string; /** * Create a deep clone of this journey */ clone(): Journey; /** * Get the diagram title */ get title(): string | undefined; /** * Get all sections */ get sections(): JourneySection[]; /** * Get section count */ get sectionCount(): number; /** * Get total task count */ get taskCount(): number; /** * Get all unique actors */ get actors(): string[]; /** * Set the diagram title */ setTitle(title: string): this; /** * Add a new section */ addSection(name: string): this; /** * Get a section by name */ getSection(name: string): JourneySection | undefined; /** * Remove a section and all its tasks */ removeSection(name: string): this; /** * Rename a section */ renameSection(oldName: string, newName: string): this; /** * Add a task to a section */ addTask(sectionName: string, taskName: string, options?: AddJourneyTaskOptions): this; /** * Remove a task from a section */ removeTask(sectionName: string, taskName: string): this; /** * Get a task by name */ getTask(taskName: string): JourneyTask | undefined; /** * Set task score */ setScore(taskName: string, score: number): this; /** * Add an actor to a task */ addActor(taskName: string, actor: string): this; /** * Remove an actor from a task */ removeActor(taskName: string, actor: string): this; /** * Move a task to a different section */ moveTask(taskName: string, toSection: string): this; /** * Get all tasks */ getAllTasks(): JourneyTask[]; /** * Find tasks matching a query */ findTasks(query: FindJourneyTasksQuery): JourneyTask[]; /** * Get tasks with low scores (pain points) */ getPainPoints(maxScore?: number): JourneyTask[]; /** * Get tasks with high scores (highlights) */ getHighlights(minScore?: number): JourneyTask[]; /** * Get average score across all tasks */ getAverageScore(): number; /** * Get tasks for a specific actor */ getTasksForActor(actor: string): JourneyTask[]; } //# sourceMappingURL=journey.d.ts.map