n8n
Version:
n8n Workflow Automation Tool
23 lines (22 loc) • 1.18 kB
TypeScript
import type { User } from '../databases/entities/User';
import { SharedWorkflowRepository } from '../databases/repositories/sharedWorkflow.repository';
import { RoleService } from '../services/role.service';
import type { Scope } from '@n8n/permissions';
import type { ProjectRole } from '../databases/entities/ProjectRelation';
import type { WorkflowSharingRole } from '../databases/entities/SharedWorkflow';
import { ProjectRelationRepository } from '../databases/repositories/projectRelation.repository';
export declare class WorkflowSharingService {
private readonly sharedWorkflowRepository;
private readonly roleService;
private readonly projectRelationRepository;
constructor(sharedWorkflowRepository: SharedWorkflowRepository, roleService: RoleService, projectRelationRepository: ProjectRelationRepository);
getSharedWorkflowIds(user: User, options: {
scopes: Scope[];
projectId?: string;
} | {
projectRoles: ProjectRole[];
workflowRoles: WorkflowSharingRole[];
projectId?: string;
}): Promise<string[]>;
getSharedWorkflowScopes(workflowIds: string[], user: User): Promise<Array<[string, Scope[]]>>;
}