import { EnumerateAndSearchRequest, EnumerateRequest, EnumerateResponse, Graph, GraphCreateRequest, GraphSearchRequest, GraphStatistics, GraphStatisticsResponse, IncludeDataAndSubordinates, ReadFirstRequest, ReadSubGraphResponse, SearchResult, VectorIndexEnableRequest, VectorIndexEnableResponse, VectorIndexStatsResponse } from '../types'; import SdkBase from './SdkBase'; import { SdkConfiguration } from './SdkConfiguration'; export declare class GraphSdk extends SdkBase { /** * Instantiate the SDK. * @param {SdkConfiguration} config - The SDK configuration. */ constructor(config: SdkConfiguration); /** * Check if a graph exists by GUID. * @param {string} guid - The GUID of the graph. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - True if the graph exists. */ exists(guid: string, cancellationToken?: AbortController): Promise; /** * Create a graph. * @param {GraphCreateRequest} graph - Information about the graph. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The created graph. */ create(graph: GraphCreateRequest, cancellationToken?: AbortController): Promise; /** * Read all graphs. * @param {IncludeDataAndSubordinates} request - Information about the read all request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - An array of graphs. */ readAll(request?: IncludeDataAndSubordinates, cancellationToken?: AbortController): Promise; /** * Read multiple graphs. * @param {string[]} graphGuids - The GUIDs of the graphs. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The graphs. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ readMany(graphGuids: string[], cancellationToken?: AbortController): Promise; /** * Search graphs. * @param {GraphSearchRequest} searchReq - Information about the search request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The search result. */ search(searchReq: GraphSearchRequest, cancellationToken?: AbortController): Promise; /** * Read a specific graph. * @param {string} guid - The GUID of the graph. * @param {IncludeDataAndSubordinates} request - Information about the read request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The requested graph. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ read(guid: string, request?: IncludeDataAndSubordinates, cancellationToken?: AbortController): Promise; /** * Read a first graph. * @param {ReadFirstRequest} request - Information about the read first request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The first graph. */ readFirst(request: ReadFirstRequest, cancellationToken?: AbortController): Promise; /** * Update a graph. * @param {Graph} graph - Information about the graph. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The updated graph. */ update(graph: Graph, cancellationToken?: AbortController): Promise; /** * Delete a graph. * @param {string} guid - The GUID of the graph. * @param {boolean} force - Force recursive deletion of edges and nodes. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The deleted graph. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ delete(guid: string, force?: boolean, cancellationToken?: AbortController): Promise; /** * Export a graph to GEXF format. * @param {string} guid - The GUID of the graph. * @param {IncludeDataAndSubordinates} request - Information about the export request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The GEXF XML data. */ exportGexf(guid: string, request?: IncludeDataAndSubordinates, cancellationToken?: AbortController): Promise; /** * Enumerate all graphs. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - An array of graphs. */ enumerate(request?: EnumerateRequest, cancellationToken?: AbortController): Promise>; /** * Enumerate and Search * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise>} - An array of graphs. */ enumerateAndSearch(request: EnumerateAndSearchRequest, cancellationToken?: AbortController): Promise>; /** * Read all graphs Statistics * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - An array of graphs statistics. */ readStatistics(cancellationToken?: AbortController): Promise; /** * Read a graph Statistics * @param {string} graphGuid - The GUID of the graph. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - A graph statistics. */ readStatistic(graphGuid: string, cancellationToken?: AbortController): Promise; /** * Enable vector index for a graph. * @param {string} graphGuid - The GUID of the graph. * @param {VectorIndexEnableRequest} request - Information about the vector index configuration. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The vector index configuration. */ enableVectorIndex(graphGuid: string, request: VectorIndexEnableRequest, cancellationToken?: AbortController): Promise; /** * Read vector index configuration for a graph. * @param {string} graphGuid - The GUID of the graph. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The vector index configuration. */ readVectorIndexConfig(graphGuid: string, cancellationToken?: AbortController): Promise; /** * Read vector index statistics for a graph. * @param {string} graphGuid - The GUID of the graph. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The vector index statistics. */ readVectorIndexStats(graphGuid: string, cancellationToken?: AbortController): Promise; /** * Rebuild vector index for a graph. * @param {string} graphGuid - The GUID of the graph. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - True if the rebuild was successful. */ rebuildVectorIndex(graphGuid: string, cancellationToken?: AbortController): Promise; /** * Delete vector index for a graph. * @param {string} graphGuid - The GUID of the graph. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - True if the deletion was successful. */ deleteVectorIndex(graphGuid: string, cancellationToken?: AbortController): Promise; /** * Read a subgraph starting from a given node within a graph. * @param {string} graphGuid - The GUID of the graph. * @param {string} nodeGuid - The GUID of the starting node. * @param {{ * maxDepth?: number; * maxNodes?: number; * maxEdges?: number; * incldata?: boolean; * inclsub?: boolean; * }} [options] - Optional query parameters to control the subgraph extraction. * - maxDepth: Maximum traversal depth from the starting node. * - maxNodes: Maximum number of nodes to return. 0 means no limit. * - maxEdges: Maximum number of edges to return. 0 means no limit. * - incldata: Whether to include node/edge data. * - inclsub: Whether to include subordinate/related elements. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The subgraph as returned by the API. */ readSubGraph(graphGuid: string, nodeGuid: string, options?: { maxDepth?: number; maxNodes?: number; maxEdges?: number; incldata?: boolean; inclsub?: boolean; }, cancellationToken?: AbortController): Promise; /** * Read subgraph statistics for a specific node in a graph. * @param {string} graphGuid - The GUID of the graph. * @param {string} nodeGuid - The GUID of the starting node. * @param {Object} [options] - Optional query parameters. * @param {number} [options.maxDepth=2] - Maximum traversal depth from the starting node. * @param {number} [options.maxNodes=0] - Maximum number of nodes to consider. 0 means no limit. * @param {number} [options.maxEdges=0] - Maximum number of edges to consider. 0 means no limit. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The statistics as returned by the API. */ readSubGraphStatistics(graphGuid: string, nodeGuid: string, options?: { maxDepth?: number; maxNodes?: number; maxEdges?: number; }, cancellationToken?: AbortController): Promise; }