import { EventEmitter } from '@angular/core'; import { Observable } from 'rxjs'; import { TagBody, TagEntry, TagPaging, TagsApi } from '@alfresco/js-api'; import * as i0 from "@angular/core"; export declare class TagService { private readonly apiService; private readonly userPreferencesService; private readonly appConfigService; private _tagsApi; get tagsApi(): TagsApi; /** Emitted when tag information is updated. */ refresh: EventEmitter; /** * Gets a list of tags added to a node. * * @param nodeId ID of the target node * @returns TagPaging object (defined in JS-API) containing the tags */ getTagsByNodeId(nodeId: string): Observable; /** * Gets a list of all the tags already defined in the repository. * * @param opts Options supported by JS-API * @param includedCounts True if count field should be included in response object for each tag, false otherwise. * @returns TagPaging object (defined in JS-API) containing the tags */ getAllTheTags(opts?: any, includedCounts?: boolean): Observable; /** * Adds a tag to a node. * * @param nodeId ID of the target node * @param tagName Name of the tag to add * @returns TagEntry object (defined in JS-API) with details of the new tag */ addTag(nodeId: string, tagName: string): Observable; /** * Removes a tag from a node. * * @param nodeId ID of the target node * @param tag Name of the tag to remove * @returns Null object when the operation completes */ removeTag(nodeId: string, tag: string): Observable; /** * Creates tags. * * @param tags list of tags to create. * @returns Created tags. */ createTags(tags: TagBody[]): Observable; /** * Update a tag * * @param tagId The identifier of a tag. * @param tagBody The updated tag. * @returns Updated tag. */ updateTag(tagId: string, tagBody: TagBody): Observable; /** * Find tags which name contains searched name. * * @param name Value for name which should be used during searching tags. * @param sorting Object which configures sorting. OrderBy field specifies field used for sorting, direction specified ascending or descending direction. * Default sorting is ascending by tag field. * @param includedCounts True if count field should be included in response object for each tag, false otherwise. * @param skipCount Specify how many first results should be skipped. Default 0. * @param maxItems Specify max number of returned tags. Default is specified by UserPreferencesService. * @returns Found tags which name contains searched name. */ searchTags(name: string, sorting?: { orderBy: string; direction: string; }, includedCounts?: boolean, skipCount?: number, maxItems?: number): Observable; /** * Find tag which name matches exactly to passed name. * * @param name Value for name which should be used during finding exact tag. * @returns Found tag which name matches exactly to passed name. */ findTagByName(name: string): Observable; /** * Deletes a tag with tagId. * This will cause the tag to be removed from all nodes. * You must have admin rights to delete a tag. * * @param tagId of the tag to be deleted * @returns Null object when the operation completes */ deleteTag(tagId: string): Observable; /** * Assign tags to node. If tag is new then tag is also created additionally, if tag already exists then it is just assigned. * * @param nodeId Id of node to which tags should be assigned. * @param tags List of tags to create and assign or just assign if they already exist. * @returns Just linked tags to node or single tag if linked only one tag. */ assignTagsToNode(nodeId: string, tags: TagBody[]): Observable; /** * Checks if tags plugin is enabled. * * @returns boolean true if tags plugin is enabled, false otherwise. */ areTagsEnabled(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }