n8n
Version:
n8n Workflow Automation Tool
15 lines (14 loc) • 739 B
TypeScript
import { DataSource, Repository } from '@n8n/typeorm';
import { ProjectRelation, type ProjectRole } from '../entities/ProjectRelation';
export declare class ProjectRelationRepository extends Repository<ProjectRelation> {
constructor(dataSource: DataSource);
getPersonalProjectOwners(projectIds: string[]): Promise<ProjectRelation[]>;
getPersonalProjectsForUsers(userIds: string[]): Promise<string[]>;
findProjectRole({ userId, projectId }: {
userId: string;
projectId: string;
}): Promise<ProjectRole | null>;
countUsersByRole(): Promise<Record<ProjectRole, number>>;
findUserIdsByProjectId(projectId: string): Promise<string[]>;
findAllByUser(userId: string): Promise<ProjectRelation[]>;
}