import { EnumerateAndSearchRequest, EnumerateRequest, EnumerateResponse, IncludeDataAndSubordinates, Node, NodeCreateRequest, NodeEdgeSearchRequest, ReadFirstRequest, SearchResult } from '../types'; import SdkBase from './SdkBase'; import { SdkConfiguration } from './SdkConfiguration'; export declare class NodeSdk extends SdkBase { /** * Instantiate the SDK. * @param {SdkConfiguration} config - The SDK configuration. */ constructor(config: SdkConfiguration); /** * Check if a node exists by GUID. * @param {string} graphGuid - The GUID of the graph. * @param {string} guid - The GUID of the node. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - True if the node exists. */ exists(graphGuid: string, guid: string, cancellationToken?: AbortController): Promise; /** * Create multiple nodes. * @param {string} graphGuid - The GUID of the graph. * @param {Array} nodes - List of node objects. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise>} - The list of created nodes. */ createBulk(graphGuid: string, nodes: NodeCreateRequest[], cancellationToken?: AbortController): Promise; /** * Create a node. * @param {NodeCreateRequest} node - Information about the node. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The created node. */ create(node: NodeCreateRequest, cancellationToken?: AbortController): Promise; /** * Read nodes for a specific graph. * @param {string} graphGuid - The GUID of the graph. * @param {IncludeDataAndSubordinates} request - Information about the read all request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - An array of nodes. */ readAll(graphGuid: string, request?: IncludeDataAndSubordinates, cancellationToken?: AbortController): Promise; /** * Read multiple nodes. * @param {string} graphGuid - The GUID of the graph. * @param {string[]} nodeGuids - The GUIDs of the nodes. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - An array of nodes. */ readMany(graphGuid: string, nodeGuids: string[], cancellationToken?: AbortController): Promise; /** * Search nodes. * @param {NodeEdgeSearchRequest} searchReq - Information about the search request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The search result. */ search(searchReq: NodeEdgeSearchRequest, cancellationToken?: AbortController): Promise; /** * Read a specific node. * @param {string} graphGuid - The GUID of the graph. * @param {string} nodeGuid - The GUID of the node. * @param {IncludeDataAndSubordinates} request - Information about the read request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The requested node. */ read(graphGuid: string, nodeGuid: string, request?: IncludeDataAndSubordinates, cancellationToken?: AbortController): Promise; /** * Read a first node of a graph. * @param {string} graphGuid - The GUID of the graph. * @param {ReadFirstRequest} request - Information about the read first request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The first node of the graph. */ readFirst(graphGuid: string, request: ReadFirstRequest, cancellationToken?: AbortController): Promise; /** * Update a node. * @param {Node} node - Information about the node. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The updated node. */ update(node: Node, cancellationToken?: AbortController): Promise; /** * Delete a node. * @param {string} graphGuid - The GUID of the graph. * @param {string} nodeGuid - The GUID of the node. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. */ delete(graphGuid: string, nodeGuid: string, cancellationToken?: AbortController): Promise; /** * Delete all nodes within a graph. * @param {string} graphGuid - The GUID of the graph. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. */ deleteAll(graphGuid: string, cancellationToken?: AbortController): Promise; /** * Delete multiple nodes within a graph. * @param {string} graphGuid - The GUID of the graph. * @param {Array} nodeGuids - The list of node GUIDs to delete. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - Promise representing the completion of the deletion. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ deleteBulk(graphGuid: string, nodeGuids: string[], cancellationToken?: AbortController): Promise; /** * Enumerate all nodes. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise>} - An array of nodes. */ enumerate(graphGuid: string, request?: EnumerateRequest, cancellationToken?: AbortController): Promise>; /** * Enumerate and Search * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise>} - An array of nodes. */ enumerateAndSearch(graphGuid: string, request: EnumerateAndSearchRequest, cancellationToken?: AbortController): Promise>; }