import { MongoManager } from '../db/mongoClient.js';
import { DBScenario, DBFlow, DBSelectorSet, DBSharedData } from './testModel.js';
/**
 * Centralized registry for loading Scenarios, Flows, and Selectors.
 * Purely Database-Driven (MongoDB).
 */
export declare class TestRegistry {
    private static instance;
    private scenarioCache;
    private flowCache;
    private selectorCache;
    private sharedDataCache;
    private mongo;
    private constructor();
    getMongo(): MongoManager | null;
    static getInstance(): Promise<TestRegistry>;
    private init;
    private fetchFromApi;
    private checkMongo;
    /**
     * Loads a scenario by name and organization.
     */
    getScenario(name: string, organizationId?: string): Promise<DBScenario>;
    /**
     * Fetches all tests of a specific type for an organization.
     */
    getTests(type: 'scenarios' | 'flows' | 'selectors' | 'sharedData', organizationId: string): Promise<any[]>;
    /**
     * Loads a flow by name and organization.
     */
    getFlow(name: string, organizationId?: string): Promise<DBFlow>;
    /**
     * Loads shared data by name and organization.
     */
    getSharedData(name: string, organizationId?: string): Promise<DBSharedData>;
    /**
     * Loads a selector set by name and organization.
     */
    getSelectorSet(name: string, organizationId?: string): Promise<DBSelectorSet>;
    /**
     * Fetches a sample record from a collection for bootstrap resolution.
     */
    getSampleData(collection: string): Promise<any>;
    /**
     * Lists all scenarios.
     */
    listScenarios(organizationId?: string, filters?: Record<string, any>, limit?: number, skip?: number): Promise<DBScenario[]>;
    /**
     * Lists all flows.
     */
    listFlows(organizationId?: string, filters?: Record<string, any>): Promise<DBFlow[]>;
    /**
     * Lists all selector sets.
     */
    listSelectors(organizationId?: string, filters?: Record<string, any>): Promise<DBSelectorSet[]>;
    /**
     * Lists all shared data sets.
     */
    listSharedData(organizationId?: string, filters?: Record<string, any>): Promise<DBSharedData[]>;
    /**
     * Finds tests by tag.
     */
    getScenariosByTag(tag: string, organizationId?: string): Promise<DBScenario[]>;
    /**
     * Finds tests by namespace.
     */
    getScenariosByNamespace(namespace: string, organizationId?: string): Promise<DBScenario[]>;
    /**
     * Saves a definition to DB with organization scoping.
     */
    persist(type: 'scenarios' | 'flows' | 'selectors' | 'sharedData' | 'results', name: string, data: any, options?: {
        onlyCache?: boolean;
    }): Promise<void>;
    /**
     * Ensures a project or tag exists in the global registry.
     */
    ensureRegistryItem(type: 'projects' | 'tags', name: string, organizationId: string): Promise<void>;
    /**
     * Saves a run log.
     */
    saveRunLog(runId: string, batchId: string, log: any, organizationId?: string): Promise<void>;
    /**
     * Fetches organization-specific settings.
     */
    getOrganizationSettings(organizationId: string): Promise<any>;
    /**
     * Deletes a definition from DB.
     */
    deleteTest(type: 'scenarios' | 'flows' | 'selectors' | 'sharedData' | 'results', name: string, organizationId?: string): Promise<void>;
    /**
     * Fetches distinct values for a field.
     */
    /**
     * Fetches distinct values for a field.
     */
    distinct(collectionName: string, fieldName: string, query?: Record<string, any>): Promise<any[]>;
    /**
     * Updates multiple documents in a collection.
     */
    updateMany(collectionName: string, query: Record<string, any>, update: Record<string, any>): Promise<void>;
}
