@flexvertex/flexvertex-driver
Version:
The official FlexVertex Node.js driver
42 lines (38 loc) • 1.34 kB
JavaScript
import { FlexSession } from './session/FlexSession.js';
export * from './commons/FlexCommons.js';
export * from './interfaces/IFlexObject.js';
export * from './interfaces/IFlexSchema.js';
export * from './objects/FlexObject.js';
//export * from './connections/FlexConnection.js';
export * from './schema/FlexResultSet.js';
export * from './session/FlexSession.js';
/**
* The primary FlexVertex Node.js class.
* @hideconstructor
*/
export class FlexVertex
{
/**
*
* @param {Object} options
* @returns FlexVertex
*/
static initialize(options)
{
return new FlexVertex();
}
/**
* @param {Object} options
* @param {string} [options.protocol=https] - The protocol used for the FlexVertex REST endpoints
* @param {string} [options.hostname=localhost] - The hostname of the FlexVertex REST endpoints
* @param {string} [options.port=8000] - If hostname is 'localhost', then port defaults to 8000
* @param {string} options.username - Either the full /D/N/S/Username or an email address
* @param {string} options.password - An unencoded password
* @param {string} [options.timeout=30000] - How long (in milliseconds) each REST call has before timing out (defaults to 30000)
* @returns {FlexSession}
*/
openSession(options)
{
return new FlexSession(options);
}
}