graphdb
Version:
Javascript client library supporting GraphDB and RDF4J REST API.
43 lines (42 loc) • 1.61 kB
TypeScript
export = ServerClient;
/**
* Extends the {@link Server} with RDF4J API provided by GraphDB.
*
* @class
* @author Mihail Radkov
* @author Svilen Velikov
*/
declare class ServerClient extends Server {
/**
* Get an array of repository ids available in the server.
*
* @return {Promise<Array>} promise which resolves with an Array with
* repository ids.
*/
getRepositoryIDs(): Promise<any[]>;
/**
* Check if repository with the provided id exists.
* @param {string} id of the repository which should be checked.
* @return {Promise<boolean>} promise which resolves with boolean value.
*/
hasRepository(id: string): Promise<boolean>;
/**
* Creates a repository client instance with the provided id and
* configuration.
* @param {string} id of the repository
* @param {RepositoryClientConfig} config for the overridable repository
* configuration.
* @return {Promise<RDFRepositoryClient>} promise which resolves with
* new RDFRepositoryClient instance.
*/
getRepository(id: string, config: RepositoryClientConfig): Promise<RDFRepositoryClient>;
/**
* Delete repository with the provided id.
* @param {string} id of the repository which should be deleted.
* @return {Promise<any>} promise which resolves with the delete result.
*/
deleteRepository(id: string): Promise<any>;
}
import Server = require("./server");
import RepositoryClientConfig = require("../repository/repository-client-config");
import RDFRepositoryClient = require("../repository/rdf-repository-client");