import { BaseEngine, IMetadataProvider, UserInfo } from "@memberjunction/core";
import { MJArtifactTypeEntity, MJArtifactEntity, MJArtifactVersionEntity } from "../generated/entity_subclasses.js";
/**
 * Caching of metadata for artifacts, artifact versions, and artifact types.
 */
export declare class ArtifactMetadataEngine extends BaseEngine<ArtifactMetadataEngine> {
    /**
     * Returns the global instance of the class. This is a singleton class, so there is only one instance of it in the application. Do not directly create new instances of it, always use this method to get the instance.
     */
    static get Instance(): ArtifactMetadataEngine;
    private _artifactTypes;
    private _artifacts;
    private _artifactVersions;
    Config(forceRefresh?: boolean, contextUser?: UserInfo, provider?: IMetadataProvider): Promise<void>;
    get ArtifactTypes(): MJArtifactTypeEntity[];
    /** All artifacts in the system */
    get Artifacts(): MJArtifactEntity[];
    /** All artifact versions in the system */
    get ArtifactVersions(): MJArtifactVersionEntity[];
    /**
     * Finds an artifact type on a case-insensitive match of name
     */
    FindArtifactType(name: string): MJArtifactTypeEntity | undefined;
    /** Find an artifact by its ID */
    FindArtifactByID(id: string): MJArtifactEntity | undefined;
    /** Find an artifact version by its ID */
    FindArtifactVersionByID(id: string): MJArtifactVersionEntity | undefined;
    /** Get all versions for a given artifact, sorted by VersionNumber descending */
    GetVersionsForArtifact(artifactId: string): MJArtifactVersionEntity[];
    /** Find an artifact type by its ID */
    FindArtifactTypeByID(id: string): MJArtifactTypeEntity | undefined;
    /**
     * Returns true if the given artifact version stores its content as a binary
     * file in MJStorage (ContentMode === 'File') rather than inline text.
     */
    IsFileArtifact(version: MJArtifactVersionEntity): boolean;
    /**
     * Resolves an upload's MIME type (and optional file extension) to the
     * highest-priority registered Artifact Type. Supports exact matches and
     * subtype wildcards (e.g. `text/*`, `image/*`), with deterministic
     * tiebreaking via Priority → SystemSupplied → ID. See
     * `artifact-mime-resolver.ts` for the full algorithm.
     */
    GetArtifactTypeByMimeType(mimeType: string, fileExtension?: string): MJArtifactTypeEntity | undefined;
    /**
     * Logs WARN for any pair of registered Artifact Types that share an
     * identical (ContentType, Priority, SystemSupplied) triple — almost always
     * a configuration mistake, and the ID-tiebreaker would otherwise hide it.
     * Call after Config() to surface registry ambiguity at boot.
     */
    LogArtifactTypeRegistryConflicts(): void;
    private toMatcher;
}
//# sourceMappingURL=artifacts.d.ts.map