UNPKG

@ultipa-graph/ultipa-driver

Version:

NodeJS SDK for ultipa-server 5.2

90 lines (89 loc) 2.67 kB
import { ConnectionBase } from "./connection.base"; import { HDCGraph, JobResponse, RequestConfig, Response, HDCSyncType, Algo } from "../../types/types"; export declare const FORMAT_ALGO: (algo: any) => Algo; export declare enum HDCDirection { OUT = "out", IN = "in", UNDIRECTED = "undirected" } export declare class HDCBuilder { syncType?: HDCSyncType; hdcGraphName: string; hdcServerName: string; nodeSchema?: Map<string, string[]>; edgeSchema?: Map<string, string[]>; direction?: HDCDirection; loadId?: boolean; isDefault?: boolean; } export declare class HDCExtra extends ConnectionBase { /** * Show HDC graph * @param hdcGraphName * @param config * @returns */ showHDCGraph(config?: RequestConfig): Promise<HDCGraph[]>; /** * Drop HDC graph * @param hdcGraphName * @param config * @returns */ dropHDCGraph(hdcGraphName: string, config?: RequestConfig): Promise<Response>; /** * Create HDC graph by schema * @param hdcGraphName * @param nodeSchemas * @param edgeSchemas * @param hdcName * @param update * @param config */ createHDCGraphBySchema(builder: HDCBuilder, config?: RequestConfig): Promise<JobResponse>; /** * Show HDC algo * @param hdcServerName * @param config */ showHDCAlgo(hdcServerName: string, config?: RequestConfig): Promise<Algo[]>; /** * Uninstalls an Ultipa graph algorithm in the instance. * @param algoName * @param hdcServerName * @param config * @returns Response<boolean> */ uninstallHDCAlgo(algoName: string, hdcServerName: string, config?: RequestConfig): Promise<Response>; /** * Rollback algo * @param algoName * @param hdcServerName * @param config * @returns Response<boolean> */ rollbackHDCAlgo(algoName: string, hdcServerName: string, config?: RequestConfig): Promise<Response>; /** *Installs an Ultipa graph algorithm in the instance. files includes all file paths required to install the algo. * @param soFile * @param ymlFile * @param hdcName * @param config * @returns Response<boolean> */ installHDCAlgo(files: string[], hdcServerName: string, config?: RequestConfig): Promise<Response>; /** * install algo aio * @param req * @param config * @returns */ private installAlgoAio; /** * install algo * @param req * @param config * @returns * */ private _installAlgo; }