/** * Shared Jira Mate Types * * **CANONICAL TYPES** - Single source of truth for all Jira Mate consumers: * - CLI * - Next.js admin/webhook app * - Replit Extension * * All consumers MUST import from this module (or mirror exactly). * * INVARIANTS: * - Jira → truth for issues (tickets/bugs) * - .ticket-mate/ → truth for local projection of Jira tickets & project metadata * - .orchestrator/bugs.json → truth for local bugs, mirrored into Jira when promoted */ /** * Project configuration with explicit links to GitHub and Replit * * Each Jira project key (e.g. "CART") knows its: * - Jira instance * - GitHub repository * - Replit project */ export interface JmMateProjectConfig { projectKey: string; jiraBaseUrl: string; jiraCloudId?: string; repoUrl?: string; repoName?: string; defaultBranch?: string; replitUrl?: string; replitSlug?: string; } /** * Root .ticket-mate/config.json structure * * Supports multiple projects (multi-project mode) or single project (legacy mode) */ export interface JmMateConfig { jiraBaseUrl: string; jiraCloudId?: string; jiraProjectKey?: string; projects?: JmMateProjectConfig[]; defaultBranch?: string; integrations?: { cursor?: { enabled: boolean; }; replit?: { targets: JmMateReplitTarget[]; defaultTargetName?: string; }; }; } /** * Replit webhook target configuration */ export interface JmMateReplitTarget { name: string; webhookUrl: string; secret?: string; enabled?: boolean; } /** * Project metadata stored in .ticket-mate/projects//project.meta.json */ export interface JmMateProjectMeta { key: string; name?: string; description?: string; url?: string; lastSyncedAt?: string; } /** * Ticket metadata stored in .ticket-mate/projects//tickets//ticket.meta.json * * This is the local projection of a Jira issue. */ export interface JmMateTicketMeta { key: string; projectKey: string; summary: string; status: string; type: string; assignee?: string; storyPoints?: number; labels?: string[]; url: string; updatedAt: string; } export type BugStatus = 'open' | 'in-progress' | 'fixed' | 'ignored'; export type BugSeverity = 'low' | 'medium' | 'high' | 'critical'; export type BugSource = 'orchestrator' | 'manual' | 'ai' | 'test'; /** * Unified bug record matching Orchestrator schema * * Source of truth: .orchestrator/config/orchestrator.json (bugs array) * Mirror: .ticket-mate/bugs.json (optional, for contexts without Orchestrator) */ export interface JmBugRecord { id: string; projectKey: string; title: string; description?: string; severity?: BugSeverity; status: BugStatus; errorMessage?: string; affectedFiles?: string[]; files?: string[]; reproducible?: boolean; reproSteps?: string[]; relatedInstructions?: string[]; labels?: string[]; source?: BugSource; jiraKey?: string; githubIssueUrl?: string; createdAt: string; updatedAt: string; fixedAt?: string; } /** * Bugs file structure * Can be .orchestrator/config/orchestrator.json (bugs array) or .ticket-mate/bugs.json */ export interface JmBugsFile { bugs: JmBugRecord[]; lastUpdated?: string; } export interface JiraMateReplitWebhookTicket { key: string; projectKey: string; summary: string; status: string; url: string; updatedAt: string; } export interface JiraMateReplitWebhookBody { event: 'tickets_synced'; source: 'ticket-mate'; repoName?: string; repoUrl?: string; defaultBranch?: string; projectKey?: string; tickets: JiraMateReplitWebhookTicket[]; syncedAt: string; } /** * Get project config for a specific project key */ export declare function getProjectConfig(config: JmMateConfig, projectKey: string): JmMateProjectConfig | null; /** * Get all project keys from config */ export declare function getAllProjectKeys(config: JmMateConfig): string[]; //# sourceMappingURL=ticketMateTypes.d.ts.map