import type { PaginatedResult } from '../../types/pagination';
export declare const ReferenceType: {
    readonly Company: 0;
    readonly Department: 1;
    readonly JobTitle: 2;
    readonly Office: 3;
};
export type ReferenceType = typeof ReferenceType[keyof typeof ReferenceType];
export interface ReferenceListDto {
    id: string;
    code: string;
    name: string;
    shortName: string | null;
    description: string | null;
    isActive: boolean;
    isMerged: boolean;
    mergedIntoId: string | null;
    isFromEntra: boolean;
    entraValue: string | null;
    userCount: number;
    createdAt: string;
    tenantId: string | null;
    tenantName: string | null;
}
export interface OfficeListDto extends ReferenceListDto {
    address: string | null;
    city: string | null;
    country: string | null;
}
export interface CreateReferenceRequest {
    code: string;
    name: string;
    shortName?: string | null;
    description?: string | null;
}
export interface CreateOfficeRequest extends CreateReferenceRequest {
    address?: string | null;
    city?: string | null;
    country?: string | null;
}
export interface UpdateReferenceRequest {
    name: string;
    shortName?: string | null;
    description?: string | null;
}
export interface UpdateOfficeRequest extends UpdateReferenceRequest {
    address?: string | null;
    city?: string | null;
    country?: string | null;
}
export interface MergeReferencesRequest {
    tenantId?: string | null;
    referenceType: ReferenceType;
    targetId: string;
    sourceIds: string[];
    reason?: string | null;
}
export interface MergePreviewRequest {
    tenantId?: string | null;
    referenceType: ReferenceType;
    sourceIds: string[];
}
export interface MergeResultDto {
    targetId: string;
    targetName: string;
    totalSourcesMerged: number;
    totalUsersReassigned: number;
    sourceResults: MergeSourceResultDto[];
}
export interface MergeSourceResultDto {
    sourceId: string;
    sourceName: string;
    sourceCode: string;
    usersReassigned: number;
}
export interface MergePreviewDto {
    sources: MergeSourcePreviewDto[];
    totalUsersAffected: number;
}
export interface MergeSourcePreviewDto {
    id: string;
    code: string;
    name: string;
    shortName: string | null;
    userCount: number;
}
export interface MergeHistoryDto {
    id: string;
    tenantId: string | null;
    referenceType: ReferenceType;
    targetReferenceId: string;
    targetReferenceName: string;
    sourceReferenceId: string;
    sourceReferenceName: string;
    sourceReferenceCode: string;
    sourceReferenceShortName: string | null;
    affectedUserCount: number;
    mergedByUserId: string;
    mergedByUserName: string;
    mergeReason: string | null;
    mergedAt: string;
}
/**
 * Factory function to create references API with explicit tenant context.
 * @param tenantSlug - Optional tenant slug to use for all requests
 */
declare const _createReferencesApi: (tenantSlug?: string) => {
    companies: {
        getAll: (tenantId?: string | null, search?: string, isActive?: boolean, source?: "entra" | "manual", page?: number, pageSize?: number) => Promise<PaginatedResult<ReferenceListDto>>;
        create: (tenantId: string | null, data: CreateReferenceRequest) => Promise<ReferenceListDto>;
        update: (id: string, data: UpdateReferenceRequest) => Promise<void>;
        activate: (id: string) => Promise<void>;
        deactivate: (id: string) => Promise<void>;
        delete: (id: string) => Promise<void>;
    };
    departments: {
        getAll: (tenantId?: string | null, search?: string, isActive?: boolean, source?: "entra" | "manual", page?: number, pageSize?: number) => Promise<PaginatedResult<ReferenceListDto>>;
        create: (tenantId: string | null, data: CreateReferenceRequest) => Promise<ReferenceListDto>;
        update: (id: string, data: UpdateReferenceRequest) => Promise<void>;
        activate: (id: string) => Promise<void>;
        deactivate: (id: string) => Promise<void>;
        delete: (id: string) => Promise<void>;
    };
    jobTitles: {
        getAll: (tenantId?: string | null, search?: string, isActive?: boolean, source?: "entra" | "manual", page?: number, pageSize?: number) => Promise<PaginatedResult<ReferenceListDto>>;
        create: (tenantId: string | null, data: CreateReferenceRequest) => Promise<ReferenceListDto>;
        update: (id: string, data: UpdateReferenceRequest) => Promise<void>;
        activate: (id: string) => Promise<void>;
        deactivate: (id: string) => Promise<void>;
        delete: (id: string) => Promise<void>;
    };
    offices: {
        getAll: (tenantId?: string | null, search?: string, isActive?: boolean, source?: "entra" | "manual", page?: number, pageSize?: number) => Promise<PaginatedResult<OfficeListDto>>;
        create: (tenantId: string | null, data: CreateOfficeRequest) => Promise<OfficeListDto>;
        update: (id: string, data: UpdateOfficeRequest) => Promise<void>;
        activate: (id: string) => Promise<void>;
        deactivate: (id: string) => Promise<void>;
        delete: (id: string) => Promise<void>;
    };
    merge: {
        execute: (request: MergeReferencesRequest) => Promise<MergeResultDto>;
        preview: (request: MergePreviewRequest) => Promise<MergePreviewDto>;
        getHistory: (tenantId?: string | null, referenceType?: ReferenceType, from?: string, to?: string) => Promise<MergeHistoryDto[]>;
    };
};
export type ReferencesApi = ReturnType<typeof _createReferencesApi>;
export declare const createReferencesApi: (tenantSlug?: string) => ReferencesApi;
export declare const referencesApi: {
    companies: {
        getAll: (tenantId?: string | null, search?: string, isActive?: boolean, source?: "entra" | "manual", page?: number, pageSize?: number) => Promise<PaginatedResult<ReferenceListDto>>;
        create: (tenantId: string | null, data: CreateReferenceRequest) => Promise<ReferenceListDto>;
        update: (id: string, data: UpdateReferenceRequest) => Promise<void>;
        activate: (id: string) => Promise<void>;
        deactivate: (id: string) => Promise<void>;
        delete: (id: string) => Promise<void>;
    };
    departments: {
        getAll: (tenantId?: string | null, search?: string, isActive?: boolean, source?: "entra" | "manual", page?: number, pageSize?: number) => Promise<PaginatedResult<ReferenceListDto>>;
        create: (tenantId: string | null, data: CreateReferenceRequest) => Promise<ReferenceListDto>;
        update: (id: string, data: UpdateReferenceRequest) => Promise<void>;
        activate: (id: string) => Promise<void>;
        deactivate: (id: string) => Promise<void>;
        delete: (id: string) => Promise<void>;
    };
    jobTitles: {
        getAll: (tenantId?: string | null, search?: string, isActive?: boolean, source?: "entra" | "manual", page?: number, pageSize?: number) => Promise<PaginatedResult<ReferenceListDto>>;
        create: (tenantId: string | null, data: CreateReferenceRequest) => Promise<ReferenceListDto>;
        update: (id: string, data: UpdateReferenceRequest) => Promise<void>;
        activate: (id: string) => Promise<void>;
        deactivate: (id: string) => Promise<void>;
        delete: (id: string) => Promise<void>;
    };
    offices: {
        getAll: (tenantId?: string | null, search?: string, isActive?: boolean, source?: "entra" | "manual", page?: number, pageSize?: number) => Promise<PaginatedResult<OfficeListDto>>;
        create: (tenantId: string | null, data: CreateOfficeRequest) => Promise<OfficeListDto>;
        update: (id: string, data: UpdateOfficeRequest) => Promise<void>;
        activate: (id: string) => Promise<void>;
        deactivate: (id: string) => Promise<void>;
        delete: (id: string) => Promise<void>;
    };
    merge: {
        execute: (request: MergeReferencesRequest) => Promise<MergeResultDto>;
        preview: (request: MergePreviewRequest) => Promise<MergePreviewDto>;
        getHistory: (tenantId?: string | null, referenceType?: ReferenceType, from?: string, to?: string) => Promise<MergeHistoryDto[]>;
    };
};
export {};
//# sourceMappingURL=referencesApi.d.ts.map