UNPKG

n8n

Version:

n8n Workflow Automation Tool

38 lines (37 loc) 1.81 kB
import { type EntityManager } from '@n8n/typeorm'; import type { ICredentialDataDecryptedObject } from 'n8n-workflow'; import { SharedCredentials } from '../databases/entities/shared-credentials'; import type { User } from '../databases/entities/user'; import { SharedCredentialsRepository } from '../databases/repositories/shared-credentials.repository'; import { OwnershipService } from '../services/ownership.service'; import { ProjectService } from '../services/project.service.ee'; import { RoleService } from '../services/role.service'; import { CredentialsService } from './credentials.service'; export declare class EnterpriseCredentialsService { private readonly sharedCredentialsRepository; private readonly ownershipService; private readonly credentialsService; private readonly projectService; private readonly roleService; constructor(sharedCredentialsRepository: SharedCredentialsRepository, ownershipService: OwnershipService, credentialsService: CredentialsService, projectService: ProjectService, roleService: RoleService); shareWithProjects(user: User, credentialId: string, shareWithIds: string[], entityManager?: EntityManager): Promise<SharedCredentials[]>; getOne(user: User, credentialId: string, includeDecryptedData: boolean): Promise<{ name: string; type: string; shared: SharedCredentials[]; isManaged: boolean; id: string; createdAt: Date; updatedAt: Date; data: ICredentialDataDecryptedObject; } | { name: string; type: string; shared: SharedCredentials[]; isManaged: boolean; id: string; createdAt: Date; updatedAt: Date; }>; transferOne(user: User, credentialId: string, destinationProjectId: string): Promise<void>; }