/** * External Import Grouping Logic * * Groups imported items by external container (JIRA project/board, ADO project/area path) * for 2-level directory structure support. * * Extracted from external-import.ts to reduce file size and improve maintainability. * * @module cli/helpers/init/external-import-grouping */ import type { ExternalItem } from '../../../importers/external-importer.js'; import type { ExternalContainerContext } from '../../../core/types/increment-metadata.js'; /** * Container group for organizing imported items */ export interface ContainerGroup { containerId: string; containerType: 'jira' | 'ado' | null; projectId: string; items: ExternalItem[]; externalContainer: ExternalContainerContext | undefined; parentItem?: ExternalItem; } /** * Group items by their source repository * Items without sourceRepo go into '_default' group */ export declare function groupItemsBySourceRepo(items: ExternalItem[]): Map; /** * Group items by external container (JIRA project, ADO project/area path) * Returns groups with container context for directory structure * * For ADO items with hierarchy, groups by parent Epic/Capability * to ensure each Epic becomes a separate FS-XXX folder. * * ADO Hierarchy: Capability → Epic → Feature → User Story → Task * - Each top-level Epic/Capability becomes its own group (→ FS-XXX folder) * - Child User Stories/Tasks are grouped under their parent Epic * - Items without parents get their own individual groups */ export declare function groupItemsByExternalContainer(items: ExternalItem[], projectPath?: string): ContainerGroup[]; /** * Group ADO items by their parent Epic/Capability hierarchy * Each top-level Epic/Capability becomes its own FS-XXX folder */ export declare function groupAdoItemsByParentHierarchy(items: ExternalItem[]): ContainerGroup[]; /** * Group non-hierarchy items (JIRA, GitHub, or ADO without hierarchy) * Groups by project/area path/repo for directory structure organization */ export declare function groupNonHierarchyItems(items: ExternalItem[]): ContainerGroup[]; //# sourceMappingURL=external-import-grouping.d.ts.map