import { EnumerateRequest, Edge, EdgeCreateRequest, NodeEdgeSearchRequest, ReadFirstRequest, SearchResult, EnumerateResponse, IncludeDataAndSubordinates } from '../types'; import { EnumerateAndSearchRequest } from '../types'; import SdkBase from './SdkBase'; import { SdkConfiguration } from './SdkConfiguration'; export declare class EdgeSdk extends SdkBase { /** * Instantiate the SDK. * @param {SdkConfiguration} config - The SDK configuration. */ constructor(config: SdkConfiguration); /** * Check if an edge exists by GUID. * @param {string} graphGuid - Graph GUID. * @param {string} guid - Edge GUID. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - True if exists. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ exists(graphGuid: string, guid: string, cancellationToken?: AbortController): Promise; /** * Create multiple edges. * @param {string} graphGuid - The GUID of the graph. * @param {Array} edges - List of edge objects. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise>} - The list of created edges. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ createBulk(graphGuid: string, edges: EdgeCreateRequest[], cancellationToken?: AbortController): Promise; /** * Create an edge. * @param {EdgeCreateRequest} edge - Information about the edge. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The created edge. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ create(edge: EdgeCreateRequest, cancellationToken?: AbortController): Promise; /** * Read edges. * @param {string} graphGuid - Graph GUID. * @param {IncludeDataAndSubordinates} request - Information about the read all request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - List of edges. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ readAll(graphGuid: string, request?: IncludeDataAndSubordinates, cancellationToken?: AbortController): Promise; /** * Search edges. * @param {NodeEdgeSearchRequest} searchReq - Information about the search request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The search result. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ search(searchReq: NodeEdgeSearchRequest, cancellationToken?: AbortController): Promise; /** * Read an edge. * @param {string} graphGuid - Graph GUID. * @param {string} edgeGuid - Edge GUID. * @param {IncludeDataAndSubordinates} request - Information about the read request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The requested edge. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ read(graphGuid: string, edgeGuid: string, request?: IncludeDataAndSubordinates, cancellationToken?: AbortController): Promise; /** * Read multiple edges. * @param {string} graphGuid - The GUID of the graph. * @param {string[]} edgeGuids - The GUIDs of the edges. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - An array of edges. */ readMany(graphGuid: string, edgeGuids: string[], cancellationToken?: AbortController): Promise; /** * Read a first edge 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 edge of the graph. */ readFirst(graphGuid: string, request: ReadFirstRequest, cancellationToken?: AbortController): Promise; /** * Update an edge. * @param {Edge} edge - Information about the edge. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The updated edge. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ update(edge: Edge, cancellationToken?: AbortController): Promise; /** * Delete an edge. * @param {string} graphGuid - Graph GUID. * @param {string} edgeGuid - Edge GUID. * @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. */ delete(graphGuid: string, edgeGuid: string, cancellationToken?: AbortController): Promise; /** * Delete all edges within a graph. * @param {string} graphGuid - The GUID of the graph. * @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. */ deleteAll(graphGuid: string, cancellationToken?: AbortController): Promise; /** * Delete multiple edges within a graph. * @param {string} graphGuid - The GUID of the graph. * @param {Array} edgeGuids - The list of edge 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, edgeGuids: string[], cancellationToken?: AbortController): Promise; /** * Enumerate all edges. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise>} - An array of edges. */ 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 edges. */ enumerateAndSearch(graphGuid: string, request: EnumerateAndSearchRequest, cancellationToken?: AbortController): Promise>; }