import { NodeEntry, SharedLinkEntry, VersionEntry } from '@alfresco/js-api'; import { default as QuickLRU } from 'quick-lru'; declare const _default: AlfrescoNodeService; export default _default; /** * Service providing operations for managing Alfresco nodes (documents, folders, etc.). */ declare class AlfrescoNodeService { lruNode: QuickLRU; lruChildren: QuickLRU; lruParents: QuickLRU; lruDocumentLibrary: QuickLRU; lruVersionHistory: QuickLRU; lruHomeFolder: QuickLRU; lruIsFolderInUserHome: QuickLRU; /** * Retrieves a node from the nodes API with the specified attributes. * * @param {string} id The unique identifier of the node to retrieve. * @return {Promise} A promise that resolves to the retrieved node object containing its details. */ getNode(id: string): Promise; /** * Retrieves the content of a specific node. * * @param {string} nodeId - The unique identifier of the node for which content is being retrieved. * @param {boolean} attachment - A flag indicating whether to retrieve the content as an attachment. * @return {Promise} A promise that resolves to the content of the node, or rejects with an error if the operation fails. */ getNodeContent(nodeId: string, attachment: boolean): Promise; /** * Creates a new node using the specified identifier and options. * * @param {string} id - The unique identifier for the node to be created. * @param {NodeBodyCreate} opts - An object containing configuration options for the node. * @return {Promise} A promise that resolves to the created node object. * @throws {Error} If the node creation fails, an error will be thrown with additional details. */ createNode(id: string, opts: NodeBodyCreate): Promise; /** * Fetch children of a node. If node is a "space", fetch only children from documentLibrary. * Check pagination.hasMoreItems to check if you need to load more elements. * @param id parent node id * @param maxItems The maximum number of items to return in the list.. * @param skipCount Number of items already loaded. * @param refresh boolean, if true, refresh the cache * @return {Promise<{documentLibrary: *, children: *, pagination: *} | {children: *, pagination: *}>} */ getChildren(id: any, maxItems?: number, skipCount?: number, refresh?: boolean): Promise<{ documentLibrary: any; children: any; pagination: any; } | { children: any; pagination: any; }>; /** * Fetch children of a node. If node is a "space", fetch only children from documentLibrary. * Please take care of pagination. * @param id parent node id * @param opts options send to nodesApi.listNodeChildren * @param refresh boolean, if true, refresh the cache * @return {Promise<{documentLibrary: *, children: *, pagination: *} | {children: *, pagination: *}>} */ getChildrenWithOpts(id: any, opts: any, refresh?: boolean): Promise<{ documentLibrary: any; children: any; pagination: any; } | { children: any; pagination: any; }>; /** * Fetch children of a node. If node is a "space", return all containers like documentLibrary. * Please take care of pagination. * @param id parent node id * @param opts options send to nodesApi.listNodeChildren * @return {Promise<{documentLibrary: *, children: *, pagination: *} | {children: *, pagination: *}>} */ getDirectChildren(id: any, opts: any): Promise<{ documentLibrary: any; children: any; pagination: any; } | { children: any; pagination: any; }>; /** * Updates a node with the specified identifier and options. * * @param {string} id - The identifier of the node to be updated. * @param {Object} nodeBodyUpdate - An object containing the update options for the node. * @return {Promise} A promise that resolves when the node is successfully updated or rejects with an error if the update fails. */ updateNode(id: string, nodeBodyUpdate: any): Promise; /** * Update the MIME type of a node's content without changing the content itself. * Downloads the current content and re-uploads it with the new MIME type. * @param {string} id - The node identifier. * @param {string} mimeType - The new MIME type (e.g. "text/plain"). * @return {Promise} A promise that resolves with the updated node entry. */ updateMimeType(id: string, mimeType: string): Promise; /** * Create a version if not existe. * @param id */ checkVersion(id: any): Promise; deleteNode(id: any, type: any): Promise; getParents(id: any): any; getDocumentLibrary(id: any): Promise; updateContentNode(id: any, bin: any, version: any, comment: any): Promise< NodeEntry>; copyNode(id: any, destination: any, name: any): Promise< NodeEntry>; moveNode(id: any, targetParentId: any, newName: any, opts: any): Promise< NodeEntry>; createSharedLink(node: any): Promise< SharedLinkEntry>; deleteSharedLink(linkId: any): Promise; revertVersion(nodeId: any, versionId: any, comment: any): Promise< VersionEntry>; listNodeVersionHistory(nodeId: any): Promise; getVersionContent(nodeId: any, versionId: any, attachment: any): Promise; getSharedLink(shareId: any): Promise< SharedLinkEntry>; getSharedLinkContent(shareId: any): Promise; getSharedLinkRenditionContent(shareId: any): Promise; getHomeFolderFromUser(idUser: any): Promise; getUserHomeNode(): Promise; isFolderInUserHome(nodeId: any, homeFolderId: any): Promise; } //# sourceMappingURL=AlfrescoNodeService.d.ts.map