/** * Hierarchy Mapper * * Maps external work item types to SpecWeave hierarchy levels. * * @module importers/item-converter/hierarchy-mapper * @since v1.0.115 */ import type { HierarchyMappingConfig, SpecWeaveHierarchyLevel } from '../../core/types/sync-profile.js'; import type { Platform } from './types.js'; /** * Normalize ADO work item type to canonical form * ADO returns both singular ('Epic') and plural ('Epics') forms * CRITICAL (v0.30.4): Fixes bug where 'Epics' didn't match 'epic' * * @param witType - Work item type from ADO (e.g., 'Epics', 'Epic', 'Feature') * @returns Normalized lowercase singular form (e.g., 'epic', 'feature', 'capability') */ export declare function normalizeAdoWorkItemType(witType: string | undefined): string | undefined; /** * Get default hierarchy mapping for a platform */ export declare function getDefaultMapping(platform: Platform): HierarchyMappingConfig; /** * Case-insensitive check if a type matches any item in an array */ export declare function typeMatchesArray(normalizedType: string, types: string[]): boolean; /** * Get the SpecWeave hierarchy level for a work item type * * Uses the new array-based HierarchyMappingConfig for flexible mapping. * Works with ANY hierarchy depth (3/4/5 levels) and ANY external tool. * * **Core Principle:** * - User Story and Task are FIXED (always the same mapping) * - Container levels (Epic/Feature) are FLEXIBLE (configurable per project) * * @param workItemType - External work item type (e.g., 'Epic', 'User Story', 'Task') * @param platform - Platform (ado, jira, github) for default mapping selection * @param hierarchyMapping - Optional custom hierarchy mapping * @returns SpecWeave hierarchy level (epic, feature, user_story, task, skip) */ export declare function getSpecWeaveLevel(workItemType: string | undefined, platform?: Platform, hierarchyMapping?: HierarchyMappingConfig): SpecWeaveHierarchyLevel; /** * Check if a work item type is a "container-level" type (epic or feature) * * Container-level types create folders (EP-* or FS-*), not user story files. */ export declare function isFeatureLevelType(workItemType: string | undefined, platform?: Platform, hierarchyMapping?: HierarchyMappingConfig): boolean; /** * Get user-friendly label for JIRA work item type */ export declare function getJiraWorkItemTypeLabel(type: string | undefined): string | undefined; //# sourceMappingURL=hierarchy-mapper.d.ts.map