/** * Ticket Mate Client for Host Project Integration * * Provides a unified interface for host projects to: * - Load ticket-mate.json configuration * - Execute workflows * - Access ticket-mate functionality */ import type { JiraConfig } from "../types"; export interface ResearchConfig { enabled?: boolean; [key: string]: unknown; } export interface ResearchWorkflowConfig { key: string; name: string; enabled?: boolean; [key: string]: unknown; } export interface JiraMateConfigPaths { progressRoot?: string; jiraMateRoot?: string; workspaceDir?: string; ticketsDir?: string; cursorDir?: string; bugsDir?: string; releaseNotesDir?: string; researchDir?: string; researchRequestsDir?: string; researchResultsDir?: string; researchInstructionsDir?: string; researchFieldsDir?: string; } /** * Extended ticket-mate configuration */ export interface JiraMateConfig { version: number; project?: { name: string; code: string; monorepo?: boolean; }; paths?: { progressRoot?: string; jiraMateRoot?: string; workspaceDir?: string; ticketsDir?: string; cursorDir?: string; bugsDir?: string; releaseNotesDir?: string; researchDir?: string; researchRequestsDir?: string; researchResultsDir?: string; researchInstructionsDir?: string; researchFieldsDir?: string; }; jira?: { host?: string; projectKey?: string; defaultIssueType?: string; [key: string]: unknown; }; cursor?: { instructionsDir?: string; }; ui?: { panels?: Array<{ id: string; label: string; description: string; workflowKey: string; }>; }; workflows?: Array; research?: ResearchConfig; [key: string]: unknown; } /** * Workflow execution options */ export interface WorkflowOptions { [key: string]: unknown; } /** * Workflow execution result */ export interface WorkflowResult { success: boolean; message?: string; data?: unknown; error?: string; } /** * Ticket Mate Client * * Main client interface for host projects to interact with ticket-mate */ export declare class JiraMateClient { private rootDir; private configPath; private config; private jiraConfig; constructor(options: { rootDir: string; configPath?: string; }); /** * Load and validate ticket-mate.json configuration */ loadConfig(): Promise; /** * Get Jira configuration * Note: Jira auth config is in jira.json (separate from ticket-mate.json) */ getJiraConfig(): Promise; /** * Run a workflow by key * * @param workflowKey - The workflow key (e.g., "workspace_to_jira") * @param options - Workflow-specific options * @returns Workflow execution result */ runWorkflow(workflowKey: string, options?: WorkflowOptions): Promise; /** * Workspace → Jira workflow * Converts workspace .md files to Jira tickets */ private runWorkspaceToJira; /** * Jira → Cursor workflow * Generates Cursor instruction files from Jira tickets */ private runJiraToCursor; /** * Bugs → Jira workflow * Syncs bugs.json with Jira Bug issues */ private runBugsToJira; /** * Ticket READMEs workflow * Generates README.md files for Jira tickets */ private runTicketReadmes; /** * Release Notes workflow * Generates release notes from Jira issues */ private runReleaseNotes; /** * Research Requests workflow * Executes research requests and generates reports */ private runResearchRequests; /** * Research → Cursor Instructions workflow * Transforms research reports into Cursor instruction files */ private runResearchToCursor; /** * Get available workflows */ getWorkflows(): Promise>; /** * Get UI panels configuration */ getUIPanels(): Promise>; } /** * Create a Ticket Mate client instance * * @param options - Client options * @param options.rootDir - Root directory of the host project * @param options.configPath - Optional path to ticket-mate.json (defaults to rootDir/ticket-mate.json) * @returns JiraMateClient instance * * @example * ```ts * import { createJiraMateClient } from "ticket-mate"; * * const client = createJiraMateClient({ * rootDir: process.cwd(), * }); * * const result = await client.runWorkflow("workspace_to_jira", {}); * ``` */ export declare function createJiraMateClient(options: { rootDir: string; configPath?: string; }): JiraMateClient; //# sourceMappingURL=ticket-mate-client.d.ts.map