import type { User, WorkflowEntity } from '@n8n/db'; import { SharedWorkflowRepository, FolderRepository, WorkflowRepository } from '@n8n/db'; import { type Scope } from '@n8n/permissions'; import type { EntityManager } from '@n8n/typeorm'; import { RoleService } from '../services/role.service'; export type FindWorkflowsForUserOptions = { filters?: { name?: string; active?: boolean; tagNames?: string[]; folderId?: string; projectId?: string; }; offset?: number; limit?: number; includePinnedData?: boolean; includeTags?: boolean; includeProjects?: boolean; includeActiveVersion?: boolean; }; export declare class WorkflowFinderService { private readonly sharedWorkflowRepository; private readonly folderRepository; private readonly roleService; private readonly workflowRepository; constructor(sharedWorkflowRepository: SharedWorkflowRepository, folderRepository: FolderRepository, roleService: RoleService, workflowRepository: WorkflowRepository); findWorkflowForUser(workflowId: string, user: User, scopes: Scope[], options?: { includeTags?: boolean; includeParentFolder?: boolean; includeActiveVersion?: boolean; em?: EntityManager; }): Promise; findWorkflowHeadForUser(workflowId: string, user: User, scopes: Scope[]): Promise<{ versionId: string; activeVersionId: string | null; updatedAt: Date; } | null>; private buildSingleWorkflowReadWhere; private findAllWhere; findWorkflowIdsWithScopeForUser(workflowIds: string[], user: User, scopes: Scope[]): Promise>; findExistingWorkflowIds(workflowIds: string[]): Promise>; findWorkflowsByIdsForUser(workflowIds: string[], user: User, scopes: Scope[], options?: { includeParentFolder?: boolean; includeTags?: boolean; includeActiveVersion?: boolean; }): Promise; findWorkflowIdsByFolder(folderIds: string[], options?: { includeArchived?: boolean; }): Promise>; findOwnedWorkflowPlacementsInProject(projectId: string, options?: { includeArchived?: boolean; }): Promise>; findRootWorkflowIdsInProject(projectId: string, options?: { includeArchived?: boolean; }): Promise; findOwnedWorkflowsBySourceWorkflowIds(projectId: string, sourceWorkflowIds: string[], options?: { includeActiveVersion?: boolean; includeParentFolder?: boolean; includeArchived?: boolean; }): Promise; hasProjectScopeForUser(user: User, scopes: Scope[], projectId: string): Promise; findProjectIdForFolder(folderId: string): Promise; findAllWorkflowIdsForUser(user: User, scopes: Scope[], folderId?: string, projectId?: string): Promise; findWorkflowsForUser(user: User, scopes: Scope[], options?: FindWorkflowsForUserOptions): Promise<{ workflows: WorkflowEntity[]; count: number; }>; }