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>; getPaginated({ offset, limit }: { offset: number; limit: number; }): Promise<{ data: TagEntity[]; count: number; }>; getById(id: string): Promise; listWithUsageCount({ limit }: { limit: number; }): Promise<{ data: ITagWithCountDb[]; totalCount: number; }>; sortByRequestOrder(tags: TagEntity[], { requestOrder }: { requestOrder: string[]; }): TagEntity[]; findByNames(names: string[]): Promise; findOrCreateByNames(names: string[]): Promise; } export {};