UNPKG

n8n

Version:

n8n Workflow Automation Tool

26 lines (25 loc) 1.83 kB
import { DataSource, Repository } from '@n8n/typeorm'; import type { EntityManager, FindManyOptions } from '@n8n/typeorm'; import { SharedWorkflow, type WorkflowSharingRole } from '../entities/SharedWorkflow'; import { type User } from '../entities/User'; import type { Scope } from '@n8n/permissions'; import { RoleService } from '../../services/role.service'; import type { Project } from '../entities/Project'; export declare class SharedWorkflowRepository extends Repository<SharedWorkflow> { private roleService; constructor(dataSource: DataSource, roleService: RoleService); getSharedWorkflowIds(workflowIds: string[]): Promise<string[]>; findByWorkflowIds(workflowIds: string[]): Promise<SharedWorkflow[]>; findSharingRole(userId: string, workflowId: string): Promise<WorkflowSharingRole | undefined>; makeOwnerOfAllWorkflows(project: Project): Promise<import("@n8n/typeorm").UpdateResult>; makeOwner(workflowIds: string[], projectId: string, trx?: EntityManager): Promise<import("@n8n/typeorm").InsertResult>; findWithFields(workflowIds: string[], { select }: Pick<FindManyOptions<SharedWorkflow>, 'select'>): Promise<SharedWorkflow[]>; deleteByIds(sharedWorkflowIds: string[], projectId: string, trx?: EntityManager): Promise<import("@n8n/typeorm").DeleteResult>; findWorkflowForUser(workflowId: string, user: User, scopes: Scope[], { includeTags, em }?: { includeTags?: boolean | undefined; em?: EntityManager | undefined; }): Promise<import("../entities/WorkflowEntity").WorkflowEntity | null>; findAllWorkflowsForUser(user: User, scopes: Scope[]): Promise<import("../entities/WorkflowEntity").WorkflowEntity[]>; findProjectIds(workflowId: string): Promise<string[]>; getWorkflowOwningProject(workflowId: string): Promise<Project | undefined>; }