import type { TagEntity, ITagWithCountDb } from '@n8n/db'; import { TagRepository, TransactionRunner } from '@n8n/db'; import { ExternalHooks } from '../external-hooks'; type GetAllResult = T extends { withUsageCount: true; } ? ITagWithCountDb[] : TagEntity[]; export declare class TagService { private externalHooks; private tagRepository; private txRunner; constructor(externalHooks: ExternalHooks, tagRepository: TagRepository, txRunner: TransactionRunner); toEntity(attrs: { name: string; id?: string; }): TagEntity; save(tag: TagEntity, actionKind: 'create' | 'update'): Promise; reconcileTagId(oldId: string, newId: string): 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; getByIds(ids: string[]): Promise; getByNames(names: string[]): Promise; getAllByWorkflowId(workflowId: string): Promise; listWithUsageCount({ limit }: { limit: number; }): Promise<{ data: ITagWithCountDb[]; totalCount: number; }>; sortByRequestOrder(tags: TagEntity[], { requestOrder }: { requestOrder: string[]; }): TagEntity[]; findOrCreateByNames(names: string[]): Promise; } export {};