import { BaseEngine, IMetadataProvider, UserInfo } from "@memberjunction/core";
import { MJQueryCategoryEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryEntityEntity, MJQueryPermissionEntity, MJQueryDependencyEntity, MJQuerySQLEntity, MJSQLDialectEntity } from "../generated/entity_subclasses.js";
import { MJQueryEntityExtended } from "../custom/MJQueryEntityExtended.js";
/**
 * Caching of metadata for queries and related data, with auto-refresh on entity changes.
 * Returns `MJQueryEntityExtended` instances which include child-relationship getters
 * (QueryFields, QueryParameters, etc.) and business logic (UserCanRun, CategoryPath, etc.).
 */
export declare class QueryEngine extends BaseEngine<QueryEngine> {
    /**
     * 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(): QueryEngine;
    private _queries;
    private _categories;
    private _fields;
    private _parameters;
    private _queryEntities;
    private _permissions;
    private _dependencies;
    private _querySQLs;
    private _sqlDialects;
    Config(forceRefresh?: boolean, contextUser?: UserInfo, provider?: IMetadataProvider): Promise<void>;
    /** All queries in the system */
    get Queries(): MJQueryEntityExtended[];
    /** All query categories */
    get Categories(): MJQueryCategoryEntity[];
    /** Alias for `Categories` — matches IMetadataProvider naming convention */
    get QueryCategories(): MJQueryCategoryEntity[];
    /** All query field definitions */
    get Fields(): MJQueryFieldEntity[];
    /** Alias for `Fields` — matches IMetadataProvider naming convention */
    get QueryFields(): MJQueryFieldEntity[];
    /** All query parameter definitions */
    get Parameters(): MJQueryParameterEntity[];
    /** Alias for `Parameters` — matches IMetadataProvider naming convention */
    get QueryParameters(): MJQueryParameterEntity[];
    /** All query-to-entity relationship mappings */
    get QueryEntities(): MJQueryEntityEntity[];
    /** All query permission records */
    get Permissions(): MJQueryPermissionEntity[];
    /** Alias for `Permissions` — matches IMetadataProvider naming convention */
    get QueryPermissions(): MJQueryPermissionEntity[];
    /** All query dependency records (composition references) */
    get Dependencies(): MJQueryDependencyEntity[];
    /** Alias for `Dependencies` — matches IMetadataProvider naming convention */
    get QueryDependencies(): MJQueryDependencyEntity[];
    /** All query SQL dialect-specific entries */
    get QuerySQLs(): MJQuerySQLEntity[];
    /** All SQL dialect definitions */
    get SQLDialects(): MJSQLDialectEntity[];
    /** Returns only queries with Status === 'Approved' */
    get ApprovedQueries(): MJQueryEntityExtended[];
    /** Find a query by its ID */
    FindQueryByID(id: string): MJQueryEntityExtended | undefined;
    /** Find a query by name, optionally scoped to a category */
    FindQueryByName(name: string, categoryId?: string): MJQueryEntityExtended | undefined;
    /** Get all field definitions for a specific query */
    GetQueryFields(queryId: string): MJQueryFieldEntity[];
    /** Get all parameter definitions for a specific query */
    GetQueryParameters(queryId: string): MJQueryParameterEntity[];
    /** Get all permission records for a specific query */
    GetQueryPermissions(queryId: string): MJQueryPermissionEntity[];
    /** Get all queries belonging to a specific category */
    GetQueriesByCategory(categoryId: string): MJQueryEntityExtended[];
    /** Find a category by name (case-insensitive) */
    FindCategory(name: string): MJQueryCategoryEntity | undefined;
}
//# sourceMappingURL=QueryEngine.d.ts.map