import type { EntityManager } from '@n8n/typeorm'; import { DataSource } from '@n8n/typeorm'; import { UserError } from 'n8n-workflow'; import { BaseRepository } from './base-repository'; import { Project } from '../entities'; import { type OperationContext, TransactionRunner } from '../services/transaction'; export declare class ProjectIdConflictError extends UserError { constructor(); } export declare class ProjectRepository extends BaseRepository { private readonly txRunner; constructor(dataSource: DataSource, txRunner: TransactionRunner); insertTeamProjectWithAdmin(data: Pick & Partial>, creatorId: string, limit: number): Promise; getPersonalProjectForUser(userId: string, entityManager?: EntityManager): Promise; getPersonalProjectForUserOrFail(userId: string, entityManager?: EntityManager): Promise; findTeamProjectIds(): Promise; findTypesByIds(ids: string[]): Promise>>; findTeamProjectInfoByIds(ids: string[], ctx?: OperationContext): Promise>>; getAccessibleProjects(userId: string): Promise; findTeamProjects(): Promise; findTeamProjectsExcluding(excludedProjectIds: string[]): Promise; getAccessibleProjectsByExactName(userId: string, name: string, type?: 'personal' | 'team'): Promise; findAllProjectsAndCount(options: ProjectListOptions): Promise<[Project[], number]>; getAccessibleProjectsAndCount(userId: string, options: ProjectListOptions): Promise<[Project[], number]>; getShareableProjectsAndCount(userId: string, options: ProjectListOptions): Promise<[Project[], number]>; private applyIdsQueryFilters; private runProjectListByIdsQuery; private applyFilters; private applyActivationOrder; private applyPagination; deleteByIds(ids: string[]): Promise; getProjectCounts(): Promise<{ personal: number; team: number; }>; findCreatorContact(projectId: string): Promise<{ email: string; firstName: string | null; } | null>; } export interface ProjectListOptions { skip?: number; take?: number; search?: string; type?: 'personal' | 'team'; activated?: boolean; }