import type { TagEntity, ITagWithCountDb } from '@n8n/db'; import { TagRepository } from '@n8n/db'; import { ExternalHooks } from '../external-hooks'; type GetAllResult = T extends { withUsageCount: true; } ? ITagWithCountDb[] : TagEntity[]; export declare class TagService { private externalHooks; private tagRepository; constructor(externalHooks: ExternalHooks, tagRepository: TagRepository); toEntity(attrs: { name: string; id?: string; }): TagEntity; save(tag: TagEntity, actionKind: 'create' | 'update'): Promise; delete(id: string): Promise; getAll(options?: T): Promise>; getById(id: string): Promise; sortByRequestOrder(tags: TagEntity[], { requestOrder }: { requestOrder: string[]; }): TagEntity[]; } export {};