Skip to content

Commit e69bc6a

Browse files
Merge branch 'main' of https://github.com/terminusdb/terminusdb-client-js into fixLinting
Signed-off-by: NeelParihar <[email protected]>
2 parents aa20e7e + 1b3f15c commit e69bc6a

File tree

13 files changed

+737
-592
lines changed

13 files changed

+737
-592
lines changed

.babelrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"presets": ["@babel/preset-env"]
2+
"presets": ["@babel/preset-env"],
3+
"plugins": ["@babel/plugin-transform-regenerator",
4+
"@babel/plugin-transform-runtime"]
35
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ const bankerSchema = [
110110

111111
async function createDataProduct(){
112112
try{
113-
await client.connect()
113+
114114
await client.createDatabase("banker", {label: "Banker Account",
115115
comment: "Testing", schema: true})
116116
//add the schema documents

docs/README.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
1-
TerminusDB Client Javascript
2-
==========================
1+
[![TerminusDB JavaScript Client](https://assets.terminusdb.com/readmes/terminusdb-client-js/header.gif)][terminusdb-client-js-docs]
32

4-
[![Discord online](https://img.shields.io/discord/689805612053168129?color=7289da&logo=Discord&label=Discord%20chat)](https://discord.gg/yTJKAma)
5-
[![Discourse topics](https://img.shields.io/discourse/topics?color=yellow&logo=Discourse&server=https%3A%2F%2Fdiscuss.terminusdb.com%2F)](https://discuss.terminusdb.com/)
6-
[![Follow on Twitter](https://img.shields.io/twitter/follow/terminusdb?color=skyblue&label=Follow%20on%20Twitter&logo=twitter&style=flat)](https://twitter.com/TerminusDB)
3+
[terminusdb-client-js-docs]: https://terminusdb.github.io/terminusdb-client-js/
74

8-
**Development status ⚙️**
5+
---
96

10-
[![build status](https://api.travis-ci.com/terminusdb/terminusdb-client.svg?branch=main)](https://travis-ci.com/terminusdb/terminusdb-client)
11-
[![Coverage Status](https://coveralls.io/repos/github/terminusdb/terminusdb-client/badge.svg?branch=master)](https://coveralls.io/repos/github/terminusdb/terminusdb-client/badge.svg?branch=master)
7+
[![Discord](https://img.shields.io/discord/689805612053168129?label=Discord&logo=Discord&style=plastic)](https://discord.gg/yTJKAma)
8+
[![Discourse](https://img.shields.io/discourse/topics?color=yellow&logo=Discourse&server=https%3A%2F%2Fdiscuss.terminusdb.com%2F&style=plastic)](https://discuss.terminusdb.com/)
9+
[![Twitter](https://img.shields.io/twitter/follow/terminusdb?color=skyblue&label=Follow%20on%20Twitter&logo=twitter&style=flat)](https://twitter.com/TerminusDB)
1210

13-
**NPM Package status 📦**
11+
[![npm version](https://img.shields.io/npm/v/@terminusdb/terminusdb-client?logo=npm)](https://www.npmjs.com/package/@terminusdb/terminusdb-client)
12+
[![npm downloads](https://img.shields.io/npm/dw/@terminusdb/terminusdb-client?color=red&label=npm%20package&logo=npm&style=flat)](https://www.npmjs.com/package/@terminusdb/terminusdb-client)
1413

15-
[![npm version shields.io](https://img.shields.io/npm/v/@terminusdb/terminusdb-client?logo=npm)](https://www.npmjs.com/package/@terminusdb/terminusdb-client)
16-
[![PyPI download month](https://img.shields.io/npm/dw/@terminusdb/terminusdb-client?color=red&label=npm%20package&logo=npm&style=flat)](https://www.npmjs.com/package/@terminusdb/terminusdb-client)
14+
> This repository is for the JavaScript client for TerminusDB and TerminusX. The
15+
> JavaScript client runs in the browser and on Node.js.
1716
18-
Promise based terminus client for the browser and node.js
17+
[**TerminusDB**][terminusdb] is an [open-source][terminusdb-repo] graph database
18+
and document store. It allows you to link JSON documents in a powerful knowledge
19+
graph all through a simple document API.
20+
21+
[terminusdb]: https://terminusdb.com/
22+
[terminusdb-docs]: https://terminusdb.com/docs/
23+
[terminusdb-repo]: https://github.com/terminusdb/terminusdb
24+
25+
**TerminusX** is a self-service data platform that allows you to build, deploy,
26+
execute, monitor, and share versioned data products. It is built on TerminusDB.
27+
TerminusX is in public beta and you can [sign up now][dashboard].
28+
29+
[dashboard]: https://dashboard.terminusdb.com/
1930

2031
## Requirements
2132

@@ -59,7 +70,7 @@ Download the terminusdb-client.min.js file from the /dist directory and save it
5970
This example creates a simple dataProduct, starting to create a database model the schema
6071
and insert a simple document
6172

62-
For the [full Documentation](https://terminusdb.github.io/terminusdb-client-js/)
73+
For the [full Documentation][terminusdb-client-js-docs]
6374

6475
```javascript
6576
const TerminusClient = require("@terminusdb/terminusdb-client");
@@ -99,7 +110,7 @@ const bankerSchema = [
99110

100111
async function createDataProduct(){
101112
try{
102-
await client.connect()
113+
103114
await client.createDatabase("banker", {label: "Banker Account",
104115
comment: "Testing", schema: true})
105116
//add the schema documents
@@ -144,7 +155,7 @@ const client = new TerminusClient.WOQLClient("http://127.0.0.1:6363/", {
144155

145156
## API
146157

147-
The API of the most recent release is documented at: <https://terminusdb.com/docs/v10.0/#/reference/reference-api>
158+
The TerminusDB API can be found at the [TerminusDB Documentation][terminusdb-docs].
148159

149160
## Report Issues
150161

docs/_sidebar.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<!-- docs/_sidebar.md -->
22
- [WOQLClient](api/woqlClient.js?id=WOQLClient)
33
- [TerminusDB Client API](api/woqlClient.js?id=terminusdb-client-api)
4-
- [Connect](api/woqlClient.js?id=connect)
54
- [Create Database](api/woqlClient.js?id=create-database)
65
- [Delete Database](api/woqlClient.js?id=delete-database)
76
- [Get Triples](api/woqlClient.js?id=get-triples)
@@ -19,10 +18,10 @@
1918
- [server](api/woqlClient.js?id=server)
2019
- [api](api/woqlClient.js?id=api)
2120
- [organization](api/woqlClient.js?id=organization)
21+
- [getDatabases](api/woqlClient.js?id=getDatabases)
22+
- [databases](api/woqlClient.js?id=databases)
2223
- [user](api/woqlClient.js?id=user)
2324
- [userOrganization](api/woqlClient.js?id=userOrganization)
24-
- [databases](api/woqlClient.js?id=databases)
25-
- [userOrganizations](api/woqlClient.js?id=userOrganizations)
2625
- [databaseInfo](api/woqlClient.js?id=databaseInfo)
2726
- [db](api/woqlClient.js?id=db)
2827
- [setSystemDb](api/woqlClient.js?id=setSystemDb)
@@ -60,6 +59,8 @@
6059
- [getEnums](api/woqlClient.js?id=getEnums)
6160
- [getClassDocuments](api/woqlClient.js?id=getClassDocuments)
6261
- [getBranches](api/woqlClient.js?id=getBranches)
62+
- [getUserOrganizations](api/woqlClient.js?id=getUserOrganizations)
63+
- [userOrganizations](api/woqlClient.js?id=userOrganizations)
6364
- [getDiff](api/woqlClient.js?id=getDiff)
6465
- [patch](api/woqlClient.js?id=patch)
6566
- [WOQL](api/woql.js?id=WOQL)

docs/api/accessControl.js.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Get all the system database roles types.
7070
### createOrganization
7171
#### accessControl.createOrganization(orgName) ⇒ <code>Promise</code>
7272
Any user can create their own organization.
73+
IMPORTANT This does not work with the API-TOKEN.
7374

7475
**Returns**: <code>Promise</code> - A promise that returns the call response object, or an Error if rejected.
7576

@@ -87,6 +88,7 @@ accessControl.createOrganization("my_org_name").then(result=>{
8788
### ifOrganizationExists
8889
#### accessControl.ifOrganizationExists(orgName) ⇒ <code>Promise</code>
8990
Check if the organization exists. it is a Head call .
91+
IMPORTANT This does not work with the API-TOKEN.
9092

9193
**Returns**: <code>Promise</code> - A promise that returns the call status object, 200: if the organization exists and 404: if the organization does not exist
9294

0 commit comments

Comments
 (0)