hrms-api-org/src/interfaces/OrgMapping.ts

25 lines
620 B
TypeScript
Raw Normal View History

/**
* Type definitions for organization mapping used in move-draft-to-current function
*/
/**
* Maps draft organization IDs to current organization IDs
* - byAncestorDNA: Maps ancestorDNA to current ID for lookup
* - byDraftId: Maps draft ID to current ID for position updates
*/
export interface OrgIdMapping {
byAncestorDNA: Map<string, string>;
byDraftId: Map<string, string>;
}
/**
* Contains mappings for all organization levels
*/
export interface AllOrgMappings {
orgRoot: OrgIdMapping;
orgChild1: OrgIdMapping;
orgChild2: OrgIdMapping;
orgChild3: OrgIdMapping;
orgChild4: OrgIdMapping;
}