Skip to content

Latest commit

 

History

History
1591 lines (1141 loc) · 82.2 KB

File metadata and controls

1591 lines (1141 loc) · 82.2 KB

Modules

LiteGraphSdkSdkBase

LiteGraph SDK class. Extends the SdkBase class.

SdkBase

SDK Base class for making API calls with logging and timeout functionality.

LiteGraphSdk ⇐ SdkBase

LiteGraph SDK class. Extends the SdkBase class.

Extends: SdkBase

module.exports ⏏

Kind: Exported class

new module.exports(endpoint, [tenantGuid], [accessKey])

Instantiate the SDK.

Param Type Default Description
endpoint string "http://localhost:8701/" The endpoint URL.
[tenantGuid] string The tenant GUID.
[accessKey] string The access key.

module.exports.graphExists(guid, [cancellationToken]) ⇒ Promise.<boolean>

Check if a graph exists by GUID.

Kind: instance method of module.exports
Returns: Promise.<boolean> - - True if the graph exists.

Param Type Description
guid string The GUID of the graph.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.createGraph(graph, [cancellationToken]) ⇒ Promise.<Graph>

Create a graph.

Kind: instance method of module.exports
Returns: Promise.<Graph> - - The created graph.

Param Type Description
graph Object Information about the graph.
graph.GUID string Globally unique identifier (automatically generated if not provided).
graph.Name string Name of the graph.
graph.Labels Array.<string> Array of labels associated with the graph.
graph.Tags Object Key-value pairs of tags.
graph.Vectors Array.<VectorMetadata> Array of vector embeddings.
graph.Data Object Object data associated with the graph (default is null).
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readGraphs([cancellationToken]) ⇒ Promise.<Array.<Graph>>

Read all graphs.

Kind: instance method of module.exports
Returns: Promise.<Array.<Graph>> - - An array of graphs.

Param Type Description
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.searchGraphs(searchReq, [cancellationToken]) ⇒ Promise.<SearchResult>

Search graphs.

Kind: instance method of module.exports
Returns: Promise.<SearchResult> - - The search result.

Param Type Description
searchReq Object Information about the search request.
searchReq.GraphGUID string Globally unique identifier for the graph (defaults to an empty GUID).
searchReq.Ordering string Ordering of the search results (default is CreatedDescending).
searchReq.Expr Object Expression used for the search (default is null).
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readGraph(guid, [cancellationToken]) ⇒ Promise.<Graph>

Read a specific graph.

Kind: instance method of module.exports
Returns: Promise.<Graph> - - The requested graph.

Param Type Description
guid string The GUID of the graph.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.updateGraph(graph, [cancellationToken]) ⇒ Promise.<Graph>

Update a graph.

Kind: instance method of module.exports
Returns: Promise.<Graph> - - The updated graph.

Param Type Description
graph Object Information about the graph.
graph.GUID string Globally unique identifier (automatically generated if not provided).
graph.name string Name of the graph.
graph.CreatedUtc Date Creation timestamp in UTC (defaults to now).
graph.data Object Object data associated with the graph (default is null).
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteGraph(guid, [cancellationToken], force)

Delete a graph.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the graph.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.
force boolean Force recursive deletion of edges and nodes.

module.exports.exportGraphToGexf(guid, [cancellationToken]) ⇒ Promise.<string>

Export a graph to GEXF format.

Kind: instance method of module.exports
Returns: Promise.<string> - - The GEXF XML data.

Param Type Description
guid string The GUID of the graph.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.batchExistence(graphGuid, existenceRequest, [cancellationToken]) ⇒ Promise.<Object>

Execute a batch existence request.

Kind: instance method of module.exports
Returns: Promise.<Object> - - The existence result.

Param Type Description
graphGuid string The GUID of the graph.
existenceRequest Object Optional initial data for the existence request.
existenceRequest.Nodes Array.<string> Array of node GUIDs.
existenceRequest.Edges Array.<string> Array of edge GUIDs.
existenceRequest.EdgesBetween Array.<EdgeBetween> Array of EdgeBetween instances.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.nodeExists(graphGuid, guid, [cancellationToken]) ⇒ Promise.<boolean>

Check if a node exists by GUID.

Kind: instance method of module.exports
Returns: Promise.<boolean> - - True if the node exists.

Param Type Description
graphGuid string The GUID of the graph.
guid string The GUID of the node.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.createNodes(graphGuid, nodes, [cancellationToken]) ⇒ Promise.<Array.<Node>>

Create multiple nodes.

Kind: instance method of module.exports
Returns: Promise.<Array.<Node>> - - The list of created nodes.

Param Type Description
graphGuid string The GUID of the graph.
nodes Array.<Object> List of node objects.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.createNode(node, [cancellationToken]) ⇒ Promise.<Node>

Create a node.

Kind: instance method of module.exports
Returns: Promise.<Node> - - The created node.

Param Type Description
node Object Information about the node.
node.GUID string Globally unique identifier (automatically generated if not provided).
node.GraphGUID string Globally unique identifier for the graph (automatically generated if not provided).
node.name string Name of the node.
node.data Object Object data associated with the node (default is null).
node.CreatedUtc Date Creation timestamp in UTC (defaults to now).
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readNodes(graphGuid, [cancellationToken]) ⇒ Promise.<Array.<Node>>

Read nodes for a specific graph.

Kind: instance method of module.exports
Returns: Promise.<Array.<Node>> - - An array of nodes.

Param Type Description
graphGuid string The GUID of the graph.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.searchNodes(searchReq, graphGuid, [cancellationToken]) ⇒ Promise.<SearchResult>

Search nodes.

Kind: instance method of module.exports
Returns: Promise.<SearchResult> - - The search result.

Param Type Description
searchReq Object Information about the search request.
searchReq.GraphGUID string Globally unique identifier for the graph (defaults to an empty GUID).
searchReq.Ordering string Ordering of the search results (default is CreatedDescending).
searchReq.Expr Object Expression used for the search (default is null).
graphGuid string The GUID of the graph.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readNode(graphGuid, nodeGuid, [cancellationToken]) ⇒ Promise.<Node>

Read a specific node.

Kind: instance method of module.exports
Returns: Promise.<Node> - - The requested node.

Param Type Description
graphGuid string The GUID of the graph.
nodeGuid string The GUID of the node.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.updateNode(node, [cancellationToken]) ⇒ Promise.<Node>

Update a node.

Kind: instance method of module.exports
Returns: Promise.<Node> - - The updated node.

Param Type Description
node Object Information about the node.
node.GUID string Globally unique identifier (automatically generated if not provided).
node.GraphGUID string Globally unique identifier for the graph (automatically generated if not provided).
node.name string Name of the node.
node.data Object Object data associated with the node (default is null).
node.CreatedUtc Date Creation timestamp in UTC (defaults to now).
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteNode(graphGuid, nodeGuid, [cancellationToken])

Delete a node.

Kind: instance method of module.exports

Param Type Description
graphGuid string The GUID of the graph.
nodeGuid string The GUID of the node.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteNodes(graphGuid, [cancellationToken])

Delete all nodes within a graph.

Kind: instance method of module.exports

Param Type Description
graphGuid string The GUID of the graph.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteMultipleNodes(graphGuid, nodeGuids, [cancellationToken])

Delete multiple nodes within a graph.

Kind: instance method of module.exports

Param Type Description
graphGuid string The GUID of the graph.
nodeGuids Array.<string> The list of node GUIDs to delete.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.edgeExists(graphGuid, guid, [cancellationToken]) ⇒ Promise.<boolean>

Check if an edge exists by GUID.

Kind: instance method of module.exports
Returns: Promise.<boolean> - - True if exists.

Param Type Description
graphGuid string Graph GUID.
guid string Edge GUID.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.createEdges(graphGuid, edges, [cancellationToken]) ⇒ Promise.<Array.<Object>>

Create multiple edges.

Kind: instance method of module.exports
Returns: Promise.<Array.<Object>> - - The list of created edges.

Param Type Description
graphGuid string The GUID of the graph.
edges Array.<Object> List of edge objects.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.createEdge(edge, [cancellationToken]) ⇒ Promise.<Edge>

Create an edge.

Kind: instance method of module.exports
Returns: Promise.<Edge> - - The created edge.

Param Type Default Description
edge Object Information about the edge.
[edge.GUID] string Globally unique identifier for the edge (automatically generated if not provided).
[edge.GraphGUID] string Globally unique identifier for the graph (automatically generated if not provided).
[edge.Name] string Name of the edge.
[edge.From] string Globally unique identifier of the from node.
[edge.To] string Globally unique identifier of the to node.
[edge.Cost] number 0 Cost associated with the edge (default is 0).
[edge.CreatedUtc] Date Creation timestamp in UTC (defaults to current UTC time).
[edge.Data] Object Additional object data associated with the edge (default is null).
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readEdges(graphGuid, [cancellationToken]) ⇒ Promise.<Array.<Edge>>

Read edges.

Kind: instance method of module.exports
Returns: Promise.<Array.<Edge>> - - List of edges.

Param Type Description
graphGuid string Graph GUID.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.searchEdges(graphGuid, searchReq, [cancellationToken]) ⇒ Promise.<SearchResult>

Search edges.

Kind: instance method of module.exports
Returns: Promise.<SearchResult> - - The search result.

Param Type Description
graphGuid string Graph GUID.
searchReq Object Information about the search request.
searchReq.GraphGUID string Globally unique identifier for the graph (defaults to an empty GUID).
searchReq.Ordering string Ordering of the search results (default is CreatedDescending).
searchReq.Expr Object Expression used for the search (default is null).
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readEdge(graphGuid, edgeGuid, [cancellationToken]) ⇒ Promise.<Edge>

Read an edge.

Kind: instance method of module.exports
Returns: Promise.<Edge> - - The requested edge.

Param Type Description
graphGuid string Graph GUID.
edgeGuid string Edge GUID.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.updateEdge(edge, [cancellationToken]) ⇒ Promise.<Edge>

Update an edge.

Kind: instance method of module.exports
Returns: Promise.<Edge> - - The updated edge.

Param Type Default Description
edge Object Information about the edge.
[edge.GUID] string Globally unique identifier for the edge (automatically generated if not provided).
[edge.GraphGUID] string Globally unique identifier for the graph (automatically generated if not provided).
[edge.Name] string Name of the edge.
[edge.From] string Globally unique identifier of the from node.
[edge.To] string Globally unique identifier of the to node.
[edge.Cost] number 0 Cost associated with the edge (default is 0).
[edge.CreatedUtc] Date Creation timestamp in UTC (defaults to current UTC time).
[edge.Data] Object Additional object data associated with the edge (default is null).
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteEdge(graphGuid, edgeGuid, [cancellationToken]) ⇒ Promise.<void>

Delete an edge.

Kind: instance method of module.exports
Returns: Promise.<void> - - Promise representing the completion of the deletion.

Param Type Description
graphGuid string Graph GUID.
edgeGuid string Edge GUID.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteEdges(graphGuid, [cancellationToken])

Delete all edges within a graph.

Kind: instance method of module.exports

Param Type Description
graphGuid string The GUID of the graph.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteMultipleEdges(graphGuid, edgeGuids, [cancellationToken])

Delete multiple edges within a graph.

Kind: instance method of module.exports

Param Type Description
graphGuid string The GUID of the graph.
edgeGuids Array.<string> The list of edge GUIDs to delete.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.getEdgesFromNode(graphGuid, nodeGuid, [cancellationToken]) ⇒ Promise.<Array.<Edge>>

Get edges from a node.

Kind: instance method of module.exports
Returns: Promise.<Array.<Edge>> - - Edges.

Param Type Description
graphGuid string Graph GUID.
nodeGuid string Node GUID.
[cancellationToken] AbortSignal Abort signal for cancellation.

module.exports.getEdgesToNode(graphGuid, nodeGuid, [cancellationToken]) ⇒ Promise.<Array.<Edge>>

Get edges to a node.

Kind: instance method of module.exports
Returns: Promise.<Array.<Edge>> - - Edges.

Param Type Description
graphGuid string Graph GUID.
nodeGuid string Node GUID.
[cancellationToken] AbortSignal Abort signal for cancellation.

module.exports.getEdgesBetween(graphGuid, fromNodeGuid, toNodeGuid, [cancellationToken]) ⇒ Promise.<Array.<Edge>>

Get edges from a given node to a given node.

Kind: instance method of module.exports
Returns: Promise.<Array.<Edge>> - - Edges.

Param Type Description
graphGuid string Graph GUID.
fromNodeGuid string From node GUID.
toNodeGuid string To node GUID.
[cancellationToken] AbortSignal Abort signal for cancellation.

module.exports.getAllNodeEdges(graphGuid, nodeGuid, [cancellationToken]) ⇒ Promise.<Array.<Edge>>

Get all edges to or from a node.

Kind: instance method of module.exports
Returns: Promise.<Array.<Edge>> - - Edges.

Param Type Description
graphGuid string Graph GUID.
nodeGuid string Node GUID.
[cancellationToken] AbortSignal Abort signal for cancellation.

module.exports.getChildrenFromNode(graphGuid, nodeGuid, [cancellationToken]) ⇒ Promise.<Array.<Node>>

Get child nodes from a node.

Kind: instance method of module.exports
Returns: Promise.<Array.<Node>> - - Child nodes.

Param Type Description
graphGuid string Graph GUID.
nodeGuid string Node GUID.
[cancellationToken] AbortSignal Abort signal for cancellation.

module.exports.getParentsFromNode(graphGuid, nodeGuid, [cancellationToken]) ⇒ Promise.<Array.<Node>>

Get parent nodes from a node.

Kind: instance method of module.exports
Returns: Promise.<Array.<Node>> - - Parent nodes.

Param Type Description
graphGuid string Graph GUID.
nodeGuid string Node GUID.
[cancellationToken] AbortSignal Abort signal for cancellation.

module.exports.getNodeNeighbors(graphGuid, nodeGuid, [cancellationToken]) ⇒ Promise.<Array.<Node>>

Get neighboring nodes from a node.

Kind: instance method of module.exports
Returns: Promise.<Array.<Node>> - - Neighboring nodes.

Param Type Description
graphGuid string Graph GUID.
nodeGuid string Node GUID.
[cancellationToken] AbortSignal Abort signal for cancellation.

module.exports.getRoutes(graphGuid, fromNodeGuid, toNodeGuid, [cancellationToken]) ⇒ Promise.<RouteResult>

Get routes between two nodes.

Kind: instance method of module.exports
Returns: Promise.<RouteResult> - - Routes.

Param Type Description
graphGuid string Graph GUID.
fromNodeGuid string From node GUID.
toNodeGuid string To node GUID.
[cancellationToken] AbortSignal Abort signal for cancellation.

module.exports.readTenants([cancellationToken]) ⇒ Promise.<Array.<TenantMetaData>>

Read all tenants.

Kind: instance method of module.exports
Returns: Promise.<Array.<TenantMetaData>> - - An array of tenants.

Param Type Description
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readTenant(tenantGuid, [cancellationToken]) ⇒ Promise.<TenantMetaData>

Read a tenant.

Kind: instance method of module.exports
Returns: Promise.<TenantMetaData> - - The tenant.

Param Type Description
tenantGuid string The GUID of the tenant.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.createTenant(tenant, [cancellationToken]) ⇒ Promise.<TenantMetaData>

Create a tenant.

Kind: instance method of module.exports
Returns: Promise.<TenantMetaData> - - The created tenant.

Param Type Description
tenant TenantMetaData The tenant to create.
tenant.name String The name of the tenant.
tenant.Active boolean Indicates if tenant is active.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.updateTenant(tenant, guid, [cancellationToken]) ⇒ Promise.<TenantMetaData>

Update a tenant.

Kind: instance method of module.exports
Returns: Promise.<TenantMetaData> - - The updated tenant.

Param Type Description
tenant TenantMetaData The tenant to update.
tenant.name String The name of the tenant.
tenant.Active boolean Indicates if tenant is active.
guid string The GUID of the tenant.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteTenant(tenantGuid, [cancellationToken]) ⇒ Promise.<Boolean>

Delete a tenant.

Kind: instance method of module.exports

Param Type Description
tenantGuid string The GUID of the tenant.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.tenantExists(tenantGuid, [cancellationToken]) ⇒ Promise.<boolean>

Tenant exists.

Kind: instance method of module.exports

Param Type Description
tenantGuid string The GUID of the tenant.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.tenantDeleteForce(tenantGuid, [cancellationToken]) ⇒ Promise.<Boolean>

Tenant delete force.

Kind: instance method of module.exports

Param Type Description
tenantGuid string The GUID of the tenant.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readAllUsers([cancellationToken]) ⇒ Promise.<Array.<UserMetadata>>

Read all users.

Kind: instance method of module.exports
Returns: Promise.<Array.<UserMetadata>> - - An array of users.

Param Type Description
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readUser(userGuid, [cancellationToken]) ⇒ Promise.<UserMetadata>

Read a user.

Kind: instance method of module.exports
Returns: Promise.<UserMetadata> - - The user.

Param Type Description
userGuid string The GUID of the user.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.createUser(user, [cancellationToken]) ⇒ Promise.<UserMetadata>

Create a user.

Kind: instance method of module.exports
Returns: Promise.<UserMetadata> - - The created user.

Param Type Description
user UserMetadata The user to create.
user.FirstName String The first name of the user.
user.LastName String The last name of the user.
user.Active boolean Indicates if user is active.
user.Email string The email of the user.
user.Password string The password of the user.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.existsUser(guid, [cancellationToken]) ⇒ Promise.<boolean>

User exists.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the user.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.updateUser(user, guid, [cancellationToken]) ⇒ Promise.<UserMetadata>

Update a user.

Kind: instance method of module.exports
Returns: Promise.<UserMetadata> - - The updated user.

Param Type Description
user UserMetadata The user to update.
user.FirstName String The first name of the user.
user.LastName String The last name of the user.
user.Active boolean Indicates if user is active.
user.Email string The email of the user.
user.Password string The password of the user.
guid string The GUID of the user.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteUser(guid, [cancellationToken]) ⇒ Promise.<Boolean>

Delete a user.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the user.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readAllCredentials([cancellationToken]) ⇒ Promise.<Array.<CredentialMetadata>>

Read all credentials.

Kind: instance method of module.exports
Returns: Promise.<Array.<CredentialMetadata>> - - An array of credentials.

Param Type Description
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readCredential(guid, [cancellationToken]) ⇒ Promise.<CredentialMetadata>

Read a credential.

Kind: instance method of module.exports
Returns: Promise.<CredentialMetadata> - - The credential.

Param Type Description
guid string The GUID of the credential.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.createCredential(credential, [cancellationToken]) ⇒ Promise.<CredentialMetadata>

Create a credential.

Kind: instance method of module.exports
Returns: Promise.<CredentialMetadata> - - The created credential.

Param Type Description
credential CredentialMetadata The credential to create.
credential.Name string The name of the credential.
credential.BearerToken string The bearer token of the credential.
credential.Active boolean Indicates if credential is active.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.updateCredential(credential, guid, [cancellationToken]) ⇒ Promise.<CredentialMetadata>

Update a credential.

Kind: instance method of module.exports
Returns: Promise.<CredentialMetadata> - - The updated credential.

Param Type Description
credential CredentialMetadata The credential to update.
credential.Name string The name of the credential.
credential.BearerToken string The bearer token of the credential.
credential.Active boolean Indicates if credential is active.
guid string The GUID of the credential.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteCredential(guid, [cancellationToken]) ⇒ Promise.<Boolean>

Delete a credential.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the credential.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.existsCredential(guid, [cancellationToken]) ⇒ Promise.<boolean>

Credential exists.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the credential.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readAllTags([cancellationToken]) ⇒ Promise.<Array.<TagMetaData>>

Read all tags.

Kind: instance method of module.exports

Param Type Description
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readTag(guid, [cancellationToken]) ⇒ Promise.<TagMetaData>

Read a tag.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the tag.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.existsTag(guid, [cancellationToken]) ⇒ Promise.<boolean>

Tag exists.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the tag.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.createTag(tag, [cancellationToken]) ⇒ Promise.<TagMetaData>

Create a tag.

Kind: instance method of module.exports

Param Type Description
tag TagMetaData The tag to create.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.updateTag(tag, guid, [cancellationToken]) ⇒ Promise.<TagMetaData>

Update a tag.

Kind: instance method of module.exports

Param Type Description
tag TagMetaData The tag to update.
guid string The GUID of the tag.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteTag(guid, [cancellationToken]) ⇒ Promise.<void>

Delete a tag.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the tag.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readAllLabels([cancellationToken]) ⇒ Promise.<Array.<LabelMetadata>>

Read all labels.

Kind: instance method of module.exports

Param Type Description
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readLabel(guid, [cancellationToken]) ⇒ Promise.<LabelMetadata>

Read a label.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the label.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.existsLabel(guid, [cancellationToken]) ⇒ Promise.<boolean>

Label exists.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the label.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.createLabel(label, [cancellationToken]) ⇒ Promise.<LabelMetadata>

Create a label.

Kind: instance method of module.exports

Param Type Description
label LabelMetadata The label to create.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.updateLabel(label, guid, [cancellationToken]) ⇒ Promise.<LabelMetadata>

Update a label.

Kind: instance method of module.exports

Param Type Description
label LabelMetadata The label to update.
guid string The GUID of the label.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteLabel(guid, [cancellationToken]) ⇒ Promise.<void>

Delete a label.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the label.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readAllVectors([cancellationToken]) ⇒ Promise.<Array.<VectorMetadata>>

Read all vectors.

Kind: instance method of module.exports

Param Type Description
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.readVector(guid, [cancellationToken]) ⇒ Promise.<VectorMetadata>

Read a vector.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the vector.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.existsVector(guid, [cancellationToken]) ⇒ Promise.<boolean>

Vector exists.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the vector.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.createVector(vector, [cancellationToken]) ⇒ Promise.<VectorMetadata>

Create a vector.

Kind: instance method of module.exports

Param Type Description
vector VectorMetadata The vector to create.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.updateVector(vector, guid, [cancellationToken]) ⇒ Promise.<VectorMetadata>

Update a vector.

Kind: instance method of module.exports

Param Type Description
vector VectorMetadata The vector to update.
guid string The GUID of the vector.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteVector(guid, [cancellationToken]) ⇒ Promise.<void>

Delete a vector.

Kind: instance method of module.exports

Param Type Description
guid string The GUID of the vector.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.searchVectors(searchReq, [cancellationToken]) ⇒ Promise.<VectorSearchResult>

Search Vectors.

Kind: instance method of module.exports
Returns: Promise.<VectorSearchResult> - - The search result.

Param Type Description
searchReq Object Information about the search request.
searchReq.GraphGUID string Globally unique identifier for the graph (defaults to an empty GUID).
searchReq.Domain string Ordering of the search results (default is CreatedDescending).
searchReq.SearchType String Expression used for the search (default is null).
searchReq.Labels Array.<string> The domain of the search type.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.generateToken(email, tenantId, password, [cancellationToken]) ⇒ Promise.<Token>

Generate an authentication token.

Kind: instance method of module.exports
Returns: Promise.<Token> - The generated authentication token

Param Type Description
email string The user's email address.
tenantId string The tenant ID.
password string The user's password.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.getTokenDetails(token, [cancellationToken]) ⇒ Promise.<Token>

Fetch details about an authentication token.

Kind: instance method of module.exports
Returns: Promise.<Token> - The token details

Param Type Description
token string The authentication token to inspect.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.getTenantsForEmail(email, [cancellationToken]) ⇒ Promise.<Array.<TenantMetaData>>

Get tenants associated with an email address.

Kind: instance method of module.exports
Returns: Promise.<Array.<TenantMetaData>> - Array of tenants associated with the email

Param Type Description
email string The email address to lookup tenants for.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

SdkBase

SDK Base class for making API calls with logging and timeout functionality.

module.exports ⏏

Kind: Exported class

new module.exports(endpoint, [tenantGuid], [accessKey])

Creates an instance of SdkBase.

Throws:

  • Error Throws an error if the endpoint is null or empty.
Param Type Description
endpoint string The API endpoint base URL.
[tenantGuid] string The tenant GUID.
[accessKey] string The access key.

module.exports.tenantGuid ⇒ string

Getter for the tenant GUID.

Kind: instance property of module.exports
Returns: string - The tenant GUID.

module.exports.tenantGuid

Setter for the tenant GUID.

Kind: instance property of module.exports
Throws:

  • Error Throws an error if the tenant GUID is null or empty.
Param Type Description
value string The tenant GUID.

module.exports.accessKey ⇒ string

Getter for the access key.

Kind: instance property of module.exports
Returns: string - The access key.

module.exports.accessKey

Setter for the access key.

Kind: instance property of module.exports
Throws:

  • Error Throws an error if the access key is null or empty.
Param Type Description
value string The access key.

module.exports.accessToken ⇒ string

Getter for the access token.

Kind: instance property of module.exports
Returns: string - The access token.

module.exports.accessToken

Setter for the access token.

Kind: instance property of module.exports
Throws:

  • Error Throws an error if the access token is null or empty.
Param Type Description
value string The access token.

module.exports.header ⇒ string

Getter for the request header prefix.

Kind: instance property of module.exports
Returns: string - The header prefix.

module.exports.header

Setter for the request header prefix.

Kind: instance property of module.exports

Param Type Description
value string The header prefix.

module.exports.endpoint ⇒ string

Getter for the API endpoint.

Kind: instance property of module.exports
Returns: string - The endpoint URL.

module.exports.endpoint

Setter for the API endpoint.

Kind: instance property of module.exports
Throws:

  • Error Throws an error if the endpoint is null or empty.
Param Type Description
value string The endpoint URL.

module.exports.timeoutMs ⇒ number

Getter for the timeout in milliseconds.

Kind: instance property of module.exports
Returns: number - The timeout in milliseconds.

module.exports.timeoutMs

Setter for the timeout in milliseconds.

Kind: instance property of module.exports
Throws:

  • Error Throws an error if the timeout is less than 1.
Param Type Description
value number Timeout value in milliseconds.

module.exports.log(sev, msg)

Logs a message with a severity level.

Kind: instance method of module.exports

Param Type Description
sev string The severity level (e.g., SeverityEnum.Debug, 'warn').
msg string The message to log.

module.exports.validateConnectivity([cancellationToken]) ⇒ Promise.<boolean>

Validates API connectivity using a HEAD request.

Kind: instance method of module.exports
Returns: Promise.<boolean> - Resolves to true if the connection is successful.
Throws:

  • Error Rejects with the error in case of failure.
Param Type Description
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.putCreate(url, obj, model, [cancellationToken]) ⇒ Promise.<Object>

Sends a PUT request to create an object at a given URL.

Kind: instance method of module.exports
Returns: Promise.<Object> - Resolves with the created object.
Throws:

  • Error Rejects if the URL or object is invalid or if the request fails.
Param Type Description
url string The URL where the object is created.
obj Object The object to be created.
model Class Modal to deserialize on
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.head(url, [cancellationToken]) ⇒ Promise.<boolean>

Checks if an object exists at a given URL using a HEAD request.

Kind: instance method of module.exports
Returns: Promise.<boolean> - Resolves to true if the object exists.
Throws:

  • Error Rejects if the URL is invalid or if the request fails.
Param Type Description
url string The URL to check.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.get(url, model, [cancellationToken], [headers]) ⇒ Promise.<Object>

Retrieves an object from a given URL using a GET request.

Kind: instance method of module.exports
Returns: Promise.<Object> - Resolves with the retrieved object.
Throws:

  • Error Rejects if the URL is invalid or if the request fails.
Param Type Description
url string The URL of the object.
model Class Modal to deserialize on
[cancellationToken] AbortController Optional cancellation token for cancelling the request.
[headers] Object Additional headers.

module.exports.getDataInBytes(url, [cancellationToken]) ⇒ Promise.<Object>

Retrieves raw data from a given URL using a GET request.

Kind: instance method of module.exports
Returns: Promise.<Object> - Resolves with the retrieved data.
Throws:

  • Error Rejects if the URL is invalid or if the request fails.
Param Type Description
url string The URL of the object.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.getMany(url, model, [cancellationToken], [headers]) ⇒ Promise.<Array>

Retrieves a list of objects from a given URL using a GET request.

Kind: instance method of module.exports
Returns: Promise.<Array> - Resolves with the list of retrieved objects.
Throws:

  • Error Rejects if the URL is invalid or if the request fails.
Param Type Description
url string The URL of the objects.
model Class Modal to deserialize on
[cancellationToken] AbortController Optional cancellation token for cancelling the request.
[headers] Object Additional headers.

module.exports.putUpdate(url, obj, model, [cancellationToken]) ⇒ Promise.<Object>

Sends a PUT request to update an object at a given URL.

Kind: instance method of module.exports
Returns: Promise.<Object> - Resolves with the created object.
Throws:

  • Error Rejects if the URL or object is invalid or if the request fails.
Param Type Description
url string The URL where the object is created.
obj Object The object to be created.
model Class Modal to deserialize on
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.delete(url, [cancellationToken]) ⇒ Promise.<void>

Sends a DELETE request to remove an object at a given URL.

Kind: instance method of module.exports
Returns: Promise.<void> - Resolves if the object is successfully deleted.
Throws:

  • Error Rejects if the URL is invalid or if the request fails.
Param Type Description
url string The URL of the object to delete.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.post(url, data, model, [cancellationToken]) ⇒ Promise.<Object>

Submits data using a POST request to a given URL.

Kind: instance method of module.exports
Returns: Promise.<Object> - Resolves with the response data.
Throws:

  • Error Rejects if the URL or data is invalid or if the request fails.
Param Type Description
url string The URL to post data to.
data Object | string The data to send in the POST request.
model Class Modal to deserialize on
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.deleteMany(url, obj, [cancellationToken]) ⇒ Promise.<void>

Sends a DELETE request to remove an object at a given URL.

Kind: instance method of module.exports
Returns: Promise.<void> - Resolves if the object is successfully deleted.
Throws:

  • Error Rejects if the URL is invalid, the object is not serializable, or if the request fails.
Param Type Description
url string The URL of the object to delete.
obj Object The object to be created.
[cancellationToken] AbortController Optional cancellation token for cancelling the request.

module.exports.postBatch(url, obj, model, [cancellationToken]) ⇒ Promise.<(Object|null)>

Submits a POST request.

Kind: instance method of module.exports
Returns: Promise.<(Object|null)> - The response data parsed as an object of type Object, or null if unsuccessful.
Throws:

  • Error If the URL is invalid or the object cannot be serialized to JSON.
Param Type Description
url string The URL to which the request is sent.
obj Object The object to send in the POST request body.
model Class Modal to deserialize on
[cancellationToken] AbortController Optional cancellation token to cancel the request.