import { AttributeResolutionDirectiveSet, CdmAttributeContext, CdmAttributeReference, CdmCorpusContext, CdmDocumentDefinition, CdmE2ERelationship, CdmEntityDefinition, CdmFolderDefinition, CdmManifestDefinition, CdmObject, CdmObjectBase, CdmObjectDefinition, CdmObjectReference, cdmObjectType, cdmStatusLevel, CdmTraitReference, CdmTypeAttributeDefinition, cdmValidationStep, docsResult, DocumentLibrary, EventCallback, ICdmProfiler, ResolvedTraitSet, resolveOptions, StorageManager, SymbolSet, TelemetryClient } from '../internal';
import { PersistenceLayer } from '../Persistence';
import { VisitCallback } from '../Utilities/VisitCallback';
export declare class CdmCorpusDefinition {
    private TAG;
    get profiler(): ICdmProfiler;
    /**
     * @internal
     */
    static _nextID: number;
    appId: string;
    telemetryClient: TelemetryClient;
    /**
     * @internal
     */
    isCurrentlyResolving: boolean;
    /**
     * The set of resolution directives that will be used by default by the object model when it is resolving
     * entities and when no per-call set of directives is provided.
     */
    defaultResolutionDirectives: AttributeResolutionDirectiveSet;
    rootPath: string;
    readonly storage: StorageManager;
    readonly persistence: PersistenceLayer;
    /**
     * Gets the object context.
     */
    readonly ctx: CdmCorpusContext;
    /**
     * @internal
     */
    definitionReferenceSymbols: Map<string, SymbolSet>;
    /**
     * @internal
     */
    rootManifest: CdmManifestDefinition;
    /**
     * @internal
     */
    documentLibrary: DocumentLibrary;
    /**
     * @internal
     */
    readonly resEntMap: Map<string, string>;
    private readonly symbolDefinitions;
    private readonly emptyRTS;
    private readonly namespaceFolders;
    private knownArtifactAttributes;
    private readonly outgoingRelationships;
    private readonly incomingRelationships;
    private readonly cdmExtension;
    constructor();
    /**
     * @internal
     */
    static nextID(): number;
    /**
     * @internal
     */
    static mapReferenceType(ofType: cdmObjectType): cdmObjectType;
    /**
     * @internal
     */
    static createCacheKeyFromObject(definition: CdmObject, kind: string): string;
    /**
     * @internal
     */
    private static fetchPriorityDoc;
    /**
     * @deprecated Use fetchObjectAsync instead.
     */
    createRootManifest(corpusPath: string): Promise<CdmManifestDefinition>;
    /**
     * @internal
     */
    createEmptyResolvedTraitSet(resOpt: resolveOptions): ResolvedTraitSet;
    /**
     * @internal
     */
    docsForSymbol(resOpt: resolveOptions, wrtDoc: CdmDocumentDefinition, fromDoc: CdmDocumentDefinition, symbolDef: string): docsResult;
    /**
     * @internal
     */
    resolveSymbolReference(resOpt: resolveOptions, fromDoc: CdmDocumentDefinition, symbolDef: string, expectedType: cdmObjectType, retry: boolean): CdmObjectBase;
    /**
     * @internal
     */
    registerDefinitionReferenceSymbols(definition: CdmObject, kind: string, symbolRefSet: SymbolSet): void;
    /**
     * @internal
     */
    unRegisterDefinitionReferenceDocuments(definition: CdmObject, kind: string): void;
    /**
     * @internal
     */
    createDefinitionCacheTag(resOpt: resolveOptions, definition: CdmObjectBase, kind: string, extraTags?: string, notKnownToHaveParameters?: boolean, pathToDef?: string): string;
    MakeRef<T extends CdmObjectReference>(ofType: cdmObjectType, refObj: string | CdmObjectDefinition, simpleNameRef: boolean): T;
    MakeObject<T extends CdmObject>(ofType: cdmObjectType, nameOrRef?: string, simmpleNameRef?: boolean): T;
    /**
     * @internal
     */
    addDocumentObjects(folder: CdmFolderDefinition, doc: CdmDocumentDefinition): CdmDocumentDefinition;
    /**
     * @internal
     */
    removeDocumentObjects(folder: CdmFolderDefinition, doc: CdmDocumentDefinition): void;
    /**
     * @internal
     */
    indexDocuments(resOpt: resolveOptions, loadImports: boolean, rootDoc: CdmDocumentDefinition, docsLoaded: Set<string>): boolean;
    /**
     * @deprecated
     */
    visit(path: string, preChildren: VisitCallback, postChildren: VisitCallback): boolean;
    /**
     * Fetches an object by the path from the corpus.
     * @param objectPath Object path, absolute or relative.
     * @param obj Optional parameter. When provided, it is used to obtain the FolderPath and the Namespace needed
     * to create the absolute path from a relative path.
     * @param shallowValidationOrResOpt Optional parameter. When provided, shallow validation in ResolveOptions is enabled,
     * which logs errors regarding resolving/loading references as warnings.
     * It also accepts a ResolveOptions object. When provided, will use be used to determine how the symbols are resolved.
     * @param forceReload Optional parameter. When true, the document containing the requested object is reloaded from storage
     * to access any external changes made to the document since it may have been cached by the corpus.
     * @returns The object obtained from the provided path.
     */
    fetchObjectAsync<T>(objectPath: string, obj?: CdmObject, shallowValidationOrResOpt?: boolean | resolveOptions | undefined, forceReload?: boolean): Promise<T>;
    setEventCallback(status: EventCallback, reportAtLevel?: cdmStatusLevel, correlationId?: string): void;
    /**
     * @internal
     */
    setImportDocuments(doc: CdmDocumentDefinition): void;
    /**
     * @internal
     */
    loadImportsAsync(doc: CdmDocumentDefinition, docsLoading: Set<string>, resOpt: resolveOptions): Promise<void>;
    /**
     * @internal
     */
    resolveImportsAsync(doc: CdmDocumentDefinition, docsLoading: Set<string>, resOpt: resolveOptions): Promise<void>;
    /**
     * @internal
     */
    finishResolve(): void;
    /**
     * @internal
     * Returns the last modified time of the file where the object at the corpusPath can be found
     * @param corpusPath The corpus path to a CDM object
     */
    computeLastModifiedTimeAsync(corpusPath: string, obj?: CdmObject): Promise<Date>;
    /**
     * @internal
     * Returns the last modified time of the file where the input object can be found
     * @param currObject A CDM object
     */
    getLastModifiedTimeFromObjectAsync(currObject: CdmObject): Promise<Date>;
    /**
     * @internal
     * Returns the last modified time of a partition object, does not try to open the file
     * as getLastModifiedTime does
     * @param corpusPath The corpus path to a CDM object
     */
    getLastModifiedTimeFromPartitionPathAsync(corpusPath: string): Promise<Date>;
    /**
     * Returns a list of relationships where the input entity is the incoming entity
     * @param entity The entity that we want to get relationships for
     */
    fetchIncomingRelationships(entity: CdmEntityDefinition): CdmE2ERelationship[];
    /**
     * Returns a list of relationships where the input entity is the outgoing entity
     * @param entity The entity that we want to get relationships for
     */
    fetchOutgoingRelationships(entity: CdmEntityDefinition): CdmE2ERelationship[];
    /**
     * Calculates the entity to entity relationships for all the entities present in the manifest and its sub-manifests.
     * @param currManifest The manifest (and any sub-manifests it contains) that we want to calculate relationships for.
     * @returns A Promise for the completion of entity graph calculation.
     */
    calculateEntityGraphAsync(currManifest: CdmManifestDefinition): Promise<void>;
    /**
     * @internal
     */
    findOutgoingRelationships(resOpt: resolveOptions, resEntity: CdmEntityDefinition, attCtx: CdmAttributeContext, isResolvedEntity?: boolean, generatedAttSetContext?: CdmAttributeContext, wasProjectionPolymorphic?: boolean, fromAtts?: CdmAttributeReference[], entityAttAttContext?: CdmAttributeContext): CdmE2ERelationship[];
    /**
     * Fetch resolved traits on purpose from attribute context (non-projection entity attribute).
     */
    private fetchPurposeTraitRefsFromAttCtx;
    /**
     * Find the corpus path for each elevated trait.
     */
    private findElevatedTraitRefsAndCorpusPaths;
    /**
     * Find the outgoing relationships for Projections.
     * Given a list of 'From' attributes, find the E2E relationships based on the 'To' information stored in the trait of the attribute in the resolved entity
     * @internal
     */
    findOutgoingRelationshipsForProjection(outRels: CdmE2ERelationship[], child: CdmAttributeContext, resOpt: resolveOptions, resEntity: CdmEntityDefinition, fromAtts?: CdmAttributeReference[], traitRefsAndCorpusPaths?: [CdmTraitReference, string][]): CdmE2ERelationship[];
    /**
     * Find the outgoing relationships for Non-Projections EntityRef
     * @internal
     */
    findOutgoingRelationshipsForEntityRef(toEntity: CdmObjectDefinition, toAtt: string[], outRels: CdmE2ERelationship[], newGenSet: CdmAttributeContext, child: CdmAttributeContext, resOpt: resolveOptions, resEntity: CdmEntityDefinition, isResolvedEntity: boolean, wasProjectionPolymorphic?: boolean, wasEntityRef?: boolean, attributeCtx?: CdmAttributeContext): CdmE2ERelationship[];
    private addTraitRefsAndCorpusPathsToRelationship;
    /**
     * Resolves references according to the provided stages and validates.
     * @returns The validation step that follows the completed step
     * @deprecated
     */
    resolveReferencesAndValidateAsync(stage: cdmValidationStep, stageThrough: cdmValidationStep, resOpt: resolveOptions): Promise<cdmValidationStep>;
    /**
     * @internal
     * fetches from primitives or creates the default attributes that get added by resolution
     */
    prepareArtifactAttributesAsync(): Promise<boolean>;
    /**
     * @internal
     * returns the (previously prepared) artifact attribute of the known name
     */
    fetchArtifactAttribute(name: string): CdmTypeAttributeDefinition;
    private removeObjectDefinitions;
    /**
     * @internal
     * @param symbolDef
     * @param inDoc
     */
    registerSymbol(symbolDef: string, inDoc: CdmDocumentDefinition): void;
    private unRegisterSymbol;
    private resolveTraits;
    private resolveReferencesTraitsArguments;
    private resolveAttributes;
    private resolveForeignKeyReferences;
    private resolveReferencesStep;
    private generateWarningsForSingleDoc;
    /**
     * Checks whether a resolved entity has an "is.identifiedBy" trait.
     */
    private checkPrimaryKeyAttributes;
    private reportErrorStatus;
    private isPathManifestDocument;
    private pathToSymbol;
    /**
     * For Projections get the list of 'From' Attributes
     */
    private getFromAttributes;
    /**
     * For Projections get the list of 'To' Attributes
     */
    private getToAttributes;
}
