import { TransactionRunner, type OperationContext } from '@n8n/db'; import { DataSource } from '@n8n/typeorm'; import { AgentChatAttachment } from '../entities/agent-chat-attachment.entity'; type InboundAttachment = Pick & { id?: string; contentHash?: string | null; }; export declare class AgentChatAttachmentRepository { private readonly table; constructor(dataSource: DataSource, transactionRunner: TransactionRunner); findProjectDeletionBatch(projectId: string, limit: number, ctx: OperationContext): Promise>>; saveInboundAttachment(params: InboundAttachment, ctx: OperationContext): Promise; findByIdInThread(id: string, scope: { projectId: string; threadId: string; }, ctx: OperationContext): Promise; findByIdsInThread(ids: string[], scope: { projectId: string; threadId: string; }, ctx: OperationContext): Promise; findByIdForAgent(id: string, scope: { agentId: string; projectId: string; }, ctx: OperationContext): Promise; findByIdForSystemAgent(id: string, scope: { agentId: string; resourceId: string; source: string; }, ctx: OperationContext): Promise; findByThread(threadId: string, scope: { projectId: string; } | { agentId: string; }, ctx: OperationContext): Promise; findCreatedByThread(createdByThreadId: string, scope: { projectId: string; threadId: string; }, ctx: OperationContext): Promise; findByHashesInThread(hashes: string[], scope: { projectId: string; threadId: string; }, ctx: OperationContext): Promise; sumUsageInThread(scope: { projectId: string; threadId: string; }, sources: string[], ctx: OperationContext): Promise<{ totalBytes: number; sourceCount: number; sourceBytes: number; }>; findInThreadNewestFirst(scope: { projectId: string; threadId: string; }, excludeSource: string | undefined, ctx: OperationContext): Promise; findByIds(ids: string[], ctx: OperationContext): Promise; findByAgent(agentId: string, ctx: OperationContext): Promise; deleteByIds(ids: string[], ctx: OperationContext): Promise; findFromSourceCreatedBefore(scope: { agentId: string; source: string; }, before: Date, limit: number, ctx: OperationContext): Promise; } export {};