import { DatabaseAdapter } from './database-adapter';
import { ParsedNode } from '../parsers/node-parser';
import { SQLiteStorageService } from '../services/sqlite-storage-service';
export interface CommunityNodeFields {
    isCommunity: boolean;
    isVerified: boolean;
    authorName?: string;
    authorGithubUrl?: string;
    npmPackageName?: string;
    npmVersion?: string;
    npmDownloads?: number;
    communityFetchedAt?: string;
}
export declare class NodeRepository {
    private db;
    constructor(dbOrService: DatabaseAdapter | SQLiteStorageService);
    saveNode(node: ParsedNode & Partial<CommunityNodeFields>): void;
    getNode(nodeType: string): any;
    getAITools(): any[];
    private safeJsonParse;
    upsertNode(node: ParsedNode): void;
    getNodeByType(nodeType: string): any;
    getNodesByCategory(category: string): any[];
    searchNodes(query: string, mode?: 'OR' | 'AND' | 'FUZZY', limit?: number): any[];
    getAllNodes(limit?: number): any[];
    getNodeCount(): number;
    getAIToolNodes(): any[];
    getToolVariant(baseNodeType: string): any | null;
    getBaseNodeForToolVariant(toolNodeType: string): any | null;
    getToolVariants(): any[];
    getToolVariantCount(): number;
    getNodesByPackage(packageName: string): any[];
    searchNodeProperties(nodeType: string, query: string, maxResults?: number): any[];
    private parseNodeRow;
    getNodeOperations(nodeType: string, resource?: string): any[];
    getNodeResources(nodeType: string): any[];
    getOperationsForResource(nodeType: string, resource: string): any[];
    getAllOperations(): Map<string, any[]>;
    getAllResources(): Map<string, any[]>;
    getNodePropertyDefaults(nodeType: string): Record<string, any>;
    getDefaultOperationForResource(nodeType: string, resource?: string): string | undefined;
    getCommunityNodes(options?: {
        verified?: boolean;
        limit?: number;
        orderBy?: 'downloads' | 'name' | 'updated';
    }): any[];
    getCommunityStats(): {
        total: number;
        verified: number;
        unverified: number;
    };
    hasNodeByNpmPackage(npmPackageName: string): boolean;
    getNodeByNpmPackage(npmPackageName: string): any | null;
    deleteCommunityNodes(): number;
    updateNodeReadme(nodeType: string, readme: string): void;
    updateNodeAISummary(nodeType: string, summary: object): void;
    getCommunityNodesWithoutReadme(): any[];
    getCommunityNodesWithoutAISummary(): any[];
    getDocumentationStats(): {
        total: number;
        withReadme: number;
        withAISummary: number;
        needingReadme: number;
        needingAISummary: number;
    };
    saveNodeVersion(versionData: {
        nodeType: string;
        version: string;
        packageName: string;
        displayName: string;
        description?: string;
        category?: string;
        isCurrentMax?: boolean;
        propertiesSchema?: any;
        operations?: any;
        credentialsRequired?: any;
        outputs?: any;
        minimumN8nVersion?: string;
        breakingChanges?: any[];
        deprecatedProperties?: string[];
        addedProperties?: string[];
        releasedAt?: Date;
    }): void;
    getNodeVersions(nodeType: string): any[];
    getLatestNodeVersion(nodeType: string): any | null;
    getNodeVersion(nodeType: string, version: string): any | null;
    savePropertyChange(changeData: {
        nodeType: string;
        fromVersion: string;
        toVersion: string;
        propertyName: string;
        changeType: 'added' | 'removed' | 'renamed' | 'type_changed' | 'requirement_changed' | 'default_changed';
        isBreaking?: boolean;
        oldValue?: string;
        newValue?: string;
        migrationHint?: string;
        autoMigratable?: boolean;
        migrationStrategy?: any;
        severity?: 'LOW' | 'MEDIUM' | 'HIGH';
    }): void;
    getPropertyChanges(nodeType: string, fromVersion: string, toVersion: string): any[];
    getBreakingChanges(nodeType: string, fromVersion: string, toVersion?: string): any[];
    getAutoMigratableChanges(nodeType: string, fromVersion: string, toVersion: string): any[];
    hasVersionMetadata(nodeType: string): boolean;
    hasVersionUpgradePath(nodeType: string, fromVersion: string, toVersion: string): boolean;
    getVersionedNodesCount(): number;
    private parseNodeVersionRow;
    private parsePropertyChangeRow;
    createWorkflowVersion(data: {
        workflowId: string;
        versionNumber: number;
        workflowName: string;
        workflowSnapshot: any;
        trigger: 'partial_update' | 'full_update' | 'autofix';
        operations?: any[];
        fixTypes?: string[];
        metadata?: any;
    }): number;
    getWorkflowVersions(workflowId: string, limit?: number): any[];
    getWorkflowVersion(versionId: number): any | null;
    getLatestWorkflowVersion(workflowId: string): any | null;
    deleteWorkflowVersion(versionId: number): void;
    deleteWorkflowVersionsByWorkflowId(workflowId: string): number;
    pruneWorkflowVersions(workflowId: string, keepCount: number): number;
    truncateWorkflowVersions(): number;
    getWorkflowVersionCount(workflowId: string): number;
    getVersionStorageStats(): any;
    private parseWorkflowVersionRow;
}
//# sourceMappingURL=node-repository.d.ts.map