Skip to content

Commit 35818ec

Browse files
Merge pull request #234 from terminusdb/integration_tests
review typedef
2 parents 083d830 + ff01db6 commit 35818ec

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

docs/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ graph all through a simple document API.
2222
[terminusdb-docs]: https://terminusdb.com/docs/
2323
[terminusdb-repo]: https://github.com/terminusdb/terminusdb
2424

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].
25+
**TerminusX** TerminusX is TerminusDB as a service. SOC 2 certified hosting. Build your beta and get to market fast. Scale up and deploy your own instance. [Sign up now][dashboard].
2826

2927
[dashboard]: https://dashboard.terminusdb.com/
3028

@@ -71,7 +69,7 @@ it to your sources, and use that in the `<script>` instead.
7169
This example creates a simple dataProduct, starting to create a database model the schema
7270
and insert a simple document
7371

74-
For the [full Documentation][terminusdb-client-js-docs]
72+
For the [full Documentation](https://terminusdb.com/docs/guides/reference-guides/javascript-client-reference)
7573

7674
```javascript
7775
const TerminusClient = require("@terminusdb/terminusdb-client");

docs/_sidebar.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- [server](api/woqlClient.js?id=server)
1919
- [api](api/woqlClient.js?id=api)
2020
- [organization](api/woqlClient.js?id=organization)
21+
- [hasDatabase](api/woqlClient.js?id=hasDatabase)
2122
- [getDatabases](api/woqlClient.js?id=getDatabases)
2223
- [databases](api/woqlClient.js?id=databases)
2324
- [user](api/woqlClient.js?id=user)
@@ -57,6 +58,7 @@
5758
- [getEnums](api/woqlClient.js?id=getEnums)
5859
- [getClassDocuments](api/woqlClient.js?id=getClassDocuments)
5960
- [getBranches](api/woqlClient.js?id=getBranches)
61+
- [getCommitsLog](api/woqlClient.js?id=getCommitsLog)
6062
- [getPrefixes](api/woqlClient.js?id=getPrefixes)
6163
- [getUserOrganizations](api/woqlClient.js?id=getUserOrganizations)
6264
- [userOrganizations](api/woqlClient.js?id=userOrganizations)
@@ -65,6 +67,8 @@
6567
- [getVersionDiff](api/woqlClient.js?id=getVersionDiff)
6668
- [apply](api/woqlClient.js?id=apply)
6769
- [patch](api/woqlClient.js?id=patch)
70+
- [sendCustomRequest](api/woqlClient.js?id=sendCustomRequest)
71+
- [WOQLClient](api/woqlClient.js?id=WOQLClient)
6872
- [WOQL](api/woql.js?id=WOQL)
6973
- [using](api/woql.js?id=using)
7074
- [comment](api/woql.js?id=comment)
@@ -91,7 +95,6 @@
9195
- [put](api/woql.js?id=put)
9296
- [as](api/woql.js?id=as)
9397
- [remote](api/woql.js?id=remote)
94-
- [file](api/woql.js?id=file)
9598
- [post](api/woql.js?id=post)
9699
- [delete_triple](api/woql.js?id=delete_triple)
97100
- [delete_quad](api/woql.js?id=delete_quad)
@@ -153,6 +156,7 @@
153156
- [vars](api/woql.js?id=vars)
154157
- [doc](api/woql.js?id=doc)
155158
- [client](api/woql.js?id=client)
159+
- [Vars](api/woql.js?id=Vars)
156160
- [emerge](api/woql.js?id=emerge)
157161
- [update_triple](api/woql.js?id=update_triple)
158162
- [update_quad](api/woql.js?id=update_quad)
@@ -211,6 +215,7 @@
211215
- [ActionType](api/typedef.js?id=ActionType)
212216
- [ParamsObj](api/typedef.js?id=ParamsObj)
213217
- [RolesObj](api/typedef.js?id=RolesObj)
218+
- [ResourceType](api/typedef.js?id=ResourceType)
214219
- [RepoType](api/typedef.js?id=RepoType)
215220
- [DbDetails](api/typedef.js?id=DbDetails)
216221
- [RemoteRepoDetails](api/typedef.js?id=RemoteRepoDetails)

docs/api/accesscontrol.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ accessControl.deleteUser(userId).then(result=>{
254254
```
255255

256256
## manageCapability
257-
##### accessControl.manageCapability(userName, resourceName, rolesArr, operation, resourceType) ⇒ <code>Promise</code>
257+
##### accessControl.manageCapability(userName, resourceName, rolesArr, operation, scopeType) ⇒ <code>Promise</code>
258258
-- TerminusdDB API ---
259259
Grant/Revoke Capability
260260

@@ -266,7 +266,7 @@ Grant/Revoke Capability
266266
| resourceName | <code>string</code> | the name of a (database or team) |
267267
| rolesArr | <code>array</code> | the roles name list |
268268
| operation | <code>typedef.CapabilityCommand</code> | grant/revoke operation |
269-
| resourceType | <code>typedef.ResourceType</code> | the resource type (database or organization) |
269+
| scopeType | <code>typedef.ScopeType</code> | the resource type (database or organization) |
270270

271271
**Example**
272272
```javascript

docs/api/typedef.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ the DELETE document interface query parameters
132132
| [invitation] | <code>string</code> | - |
133133

134134

135-
## ResourceType
136-
##### ResourceType: ` "database"` | ` "organization" `
135+
## ScopeType
136+
##### ScopeType: ` "database"` | ` "organization" `
137137

138138
## RepoType
139139
##### RepoType: ` "local"` | ` "remote" `

lib/accessControl.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ AccessControl.prototype.deleteUser = function (userId) {
304304
* @param {string} resourceName - the name of a (database or team)
305305
* @param {array} rolesArr - the roles name list
306306
* @param {typedef.CapabilityCommand} operation - grant/revoke operation
307-
* @param {typedef.ResourceType} resourceType - the resource type (database or organization)
307+
* @param {typedef.ScopeType} scopeType - the resource type (database or organization)
308308
* @return {Promise} A promise that returns the call response object, or an Error if rejected.
309309
* @example
310310
* //we add an user to an organization and manage users' access
@@ -320,13 +320,13 @@ AccessControl.prototype.deleteUser = function (userId) {
320320
* })
321321
*/
322322

323-
AccessControl.prototype.manageCapability = function (userName, resourceName, rolesArr, operation, resourceType) {
323+
AccessControl.prototype.manageCapability = function (userName, resourceName, rolesArr, operation, scopeType) {
324324
const payload = {
325325
operation,
326326
user: userName,
327327
roles: rolesArr,
328328
scope: resourceName,
329-
scope_type: resourceType,
329+
scope_type: scopeType,
330330
};
331331
return this.dispatch(`${this.baseURL}/capabilities`, CONST.POST, payload);
332332
};

lib/typedef.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const { ACTIONS } = Utils.ACTIONS;
117117
*/
118118

119119
/**
120-
* @typedef {"database"|"organization"} ResourceType
120+
* @typedef {"database"|"organization"} ScopeType
121121
*/
122122

123123
/**

0 commit comments

Comments
 (0)