import { IMidwayContainer } from '@midwayjs/core';
import type { ScopeType } from '@mwcp/share';
import { CallerInfo } from '@waiting/shared-core';
import { CallerKey, CallerKeyFileMapIndex, CallerTreeMapIndex, DbSourceName, FilePath } from './propagation/trx-status.types.js';
export declare class CallerService {
    readonly applicationContext: IMidwayContainer;
    protected readonly callerKeyFileMapIndex: CallerKeyFileMapIndex;
    protected readonly callerTreeMapIndex: CallerTreeMapIndex;
    deleteCallerKeyFileMapIndex(scope: ScopeType): void;
    deleteCallerTreeMapIndex(scope: ScopeType): void;
    retrieveCallerInfo(distance?: number, retrievePosition?: boolean): CallerInfo;
    retrieveTopCallerKeyFromCallStack(limit?: number): CallerKey[];
    retrieveFirstAncestorCallerKeyByCallerKey(dbSourceName: DbSourceName, scope: ScopeType, key: CallerKey): CallerKey | undefined;
    retrieveTopCallerKeyArrayByCallerKey(dbSourceName: DbSourceName, scope: ScopeType, key: CallerKey): CallerKey[];
    retrieveUniqueTopCallerKey(dbSourceName: DbSourceName, scope: ScopeType, key: CallerKey): CallerKey | undefined;
    validateCallerKeyUnique(dbSourceName: DbSourceName, scope: ScopeType, key: CallerKey, path: FilePath): void;
    updateCallerTreeMap(dbSourceName: DbSourceName, scope: ScopeType, entryKey: CallerKey, value: CallerKey | undefined): void;
    protected getCallerTreeArray(dbSourceName: DbSourceName, scope: ScopeType, key: CallerKey): CallerKey[] | undefined;
    protected delLastCallerKeyFromCallerTreeMap(dbSourceName: DbSourceName, scope: ScopeType, entryKey: CallerKey, key: CallerKey): void;
    /**
     * If key is not the last one, throw error
     */
    removeLastKeyFromCallerTreeArray(dbSourceName: DbSourceName, scope: ScopeType, key: CallerKey): void;
    setFilepathToCallerKeyFileMapIndex(dbSourceName: DbSourceName, scope: ScopeType, key: CallerKey, path: FilePath): void;
    protected getFilepathFromCallerKeyFileMapIndex(dbSourceName: DbSourceName, scope: ScopeType, key: CallerKey): FilePath | undefined;
    delFilepathFromCallerKeyFileMapIndex(dbSourceName: DbSourceName, scope: ScopeType, key: CallerKey): void;
}
//# sourceMappingURL=caller.service.d.ts.map