import type { CredentialSharingRole, Scope } from '@n8n/permissions'; import type { EntityManager, FindOptionsWhere, SelectQueryBuilder } from '@n8n/typeorm'; import { DataSource, Repository } from '@n8n/typeorm'; import type { CredentialsEntity, User } from '../entities'; import { Project, SharedCredentials } from '../entities'; export declare class SharedCredentialsRepository extends Repository { constructor(dataSource: DataSource); findByCredentialIds(credentialIds: string[], role: CredentialSharingRole): Promise; findOwnedCredentialsByProjects(projectIds: string[]): Promise; findOwnerProjectsByCredentialIds(credentialIds: string[]): Promise>; makeOwnerOfAllCredentials(project: Project): Promise; makeOwner(credentialIds: string[], projectId: string, trx?: EntityManager): Promise; deleteByIds(sharedCredentialsIds: string[], projectId: string, trx?: EntityManager): Promise; getFilteredAccessibleCredentials(projectIds: string[], credentialsIds: string[]): Promise; findCredentialOwningProject(credentialsId: string): Promise; getAllRelationsForCredentials(credentialIds: string[]): Promise; getSharedPersonalCredentialsCount(): Promise; findCredentialsWithOptions(where?: FindOptionsWhere, trx?: EntityManager): Promise; findCredentialsByRoles(userIds: string[], projectRoles: string[], credentialRoles: string[], trx?: EntityManager): Promise; findPairsWithCredentialAccess(pairs: Array<{ credentialId: string; userId: string; }>, scope: Scope, credentialRoles: string[], trx?: EntityManager): Promise>; buildSharedCredentialIdsSubquery(user: User, sharingOptions: { scopes?: Scope[]; projectRoles?: string[]; credentialRoles?: string[]; isPersonalProject?: boolean; personalProjectOwnerId?: string; onlySharedWithMe?: boolean; projectId?: string; }): SelectQueryBuilder; }