/** * Custom Field Mapper * * Maps and manages custom Jira fields with support for: * - Field extraction from ticket descriptions * - LLM-powered field generation * - Special field types * - Auto-sync capabilities */ import type { JiraIssue, JiraConfig } from "../types"; /** * Custom field definition */ export interface CustomFieldDefinition { /** Custom field ID (e.g., customfield_10015) */ fieldId: string; /** Field name for display */ name: string; /** Field type */ type: "text" | "textarea" | "select" | "multiselect" | "number" | "date" | "user" | "url"; /** Whether this field is required */ required?: boolean; /** Default value */ defaultValue?: string | string[] | number; /** Options for select/multiselect fields */ options?: string[]; /** Special field behavior */ special?: SpecialFieldType; /** Generator configuration */ generator?: FieldGenerator; } /** * Special field types that have special behavior */ export type SpecialFieldType = "acceptance_criteria" | "technical_notes" | "ai_instructions" | "test_scenarios" | "deployment_notes" | "rollback_plan"; /** * Field generator configuration */ export interface FieldGenerator { /** Source of data */ source: "description" | "summary" | "comments" | "llm" | "extract"; /** Extraction pattern (regex or template) */ pattern?: string; /** LLM prompt template (string or function) */ promptTemplate?: string | ((issue: JiraIssue) => string | Promise); /** Extraction function */ extractor?: (issue: JiraIssue) => string | null | Promise; /** Transformer function */ transformer?: (value: string, issue: JiraIssue) => string | Promise; } /** * Field mapping configuration */ export interface FieldMapping { /** Project key this mapping applies to */ projectKey?: string; /** Issue type this mapping applies to */ issueType?: string; /** Custom field definitions */ fields: CustomFieldDefinition[]; } /** * Field value result */ export interface FieldValue { fieldId: string; value: string | string[] | number | null; generated: boolean; source?: string; } /** * Get field mapping for a project/issue type */ export declare function getFieldMapping(config: JiraConfig, issueType?: string): FieldMapping | null; /** * Generate field values for an issue */ export declare function generateFieldValues(issue: JiraIssue, mapping: FieldMapping, options?: { useLLM?: boolean; llmModel?: string; }): Promise; /** * Update issue with field values * @deprecated Use updateIssue directly from jira-client */ export declare function updateIssueFields(issueKey: string, fieldValues: FieldValue[], config: JiraConfig): Promise; //# sourceMappingURL=field-mapper.d.ts.map