Skip to content

Commit 51b3e75

Browse files
Francesca-Bitgithub-actions[bot]
authored andcommitted
Apply docs changes
1 parent 3690b93 commit 51b3e75

File tree

4 files changed

+49
-29
lines changed

4 files changed

+49
-29
lines changed

docs/api/accesscontrol.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,25 +242,33 @@ accessControl.deleteUser(userId).then(result=>{
242242
```
243243

244244
## manageCapability
245-
##### accessControl.manageCapability(userId, resourceId, rolesArr, operation) ⇒ <code>Promise</code>
245+
##### accessControl.manageCapability(userName, resourceName, rolesArr, operation, resourceType) ⇒ <code>Promise</code>
246246
-- TerminusdDB API ---
247247
Grant/Revoke Capability
248248

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

251251
| Param | Type | Description |
252252
| --- | --- | --- |
253-
| userId | <code>string</code> | the document user id |
254-
| resourceId | <code>string</code> | the resource id (database or team) |
255-
| rolesArr | <code>array</code> | the roles list |
253+
| userName | <code>string</code> | the document user id |
254+
| resourceName | <code>string</code> | the name of a (database or team) |
255+
| rolesArr | <code>array</code> | the roles name list |
256256
| operation | <code>typedef.CapabilityCommand</code> | grant/revoke operation |
257+
| resourceType | <code>typedef.ResourceType</code> | the resource type (database or organization) |
257258

258259
**Example**
259260
```javascript
260-
{ "operation" : "grant",
261-
"scope" : "Organization/myteam",
262-
"user" : "User/myUser",
263-
"roles" : ["Role/reader"] }
261+
//we add an user to an organization and manage users' access
262+
//the user myUser can access the Organization and all the database under the organization with "reader" Role
263+
client.manageCapability(myUser,myteam,[reader],"grant","organization").then(result=>{
264+
consol.log(result)
265+
})
266+
267+
//the user myUser can access the database db__001 under the organization myteam
268+
//with "writer" Role
269+
client.manageCapability(myUser,myteam/db__001,[writer],"grant","database").then(result=>{
270+
consol.log(result)
271+
})
264272
```
265273

266274
## getAccessRoles

docs/api/typedef.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ the DELETE document interface query parameters
9292

9393
| Name | Type | Description |
9494
| --- | --- | --- |
95-
| type | <code>&#x27;basic&#x27;</code> \| <code>&#x27;jwt&#x27;</code> | the authorization type of an TerminusDB connection |
95+
| type | <code>&#x27;basic&#x27;</code> \| <code>&#x27;jwt&#x27;</code> \| <code>&#x27;apikey&#x27;</code> | the authorization type of an TerminusDB connection |
9696
| [user] | <code>string</code> \| <code>boolean</code> | the user id | I don't need the user with the jwt token |
9797
| key | <code>string</code> | the connection key |
9898

@@ -131,6 +131,9 @@ the DELETE document interface query parameters
131131
| [invitation] | <code>string</code> | - |
132132

133133

134+
## ResourceType
135+
##### ResourceType: ` "database"` | ` "organization" `
136+
134137
## RepoType
135138
##### RepoType: ` "local"` | ` "remote" `
136139

@@ -140,13 +143,9 @@ the DELETE document interface query parameters
140143

141144
| Name | Type | Description |
142145
| --- | --- | --- |
143-
| [organization] | <code>string</code> | the db organization id |
144-
| id | <code>string</code> | The database identification name |
145146
| label | <code>string</code> | "Textual DB Name" |
146147
| [comment] | <code>string</code> | "Text description of DB" |
147148
| [public] | <code>boolean</code> | |
148-
| [icon] | <code>string</code> | The database's icon |
149-
| [prefixes] | <code>object</code> | {scm: "http://url.to.use/for/scm", doc: "http://url.to.use/for/doc"} |
150149
| [schema] | <code>boolean</code> | if set to true, a schema graph will be created |
151150

152151

docs/api/woql.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -387,22 +387,6 @@ Identifies a remote resource by URL and specifies the format of the resource thr
387387
remote({url:"http://url.of.resource"}, {type: "csv"})
388388
```
389389

390-
## file
391-
##### WOQL.file(url, [formatObj]) ⇒ <code>WOQLQuery</code>
392-
Identifies a file resource as a path on the server and specifies the format through the options
393-
394-
**Returns**: <code>WOQLQuery</code> - A WOQLQuery which contains the file resource identifier
395-
396-
| Param | Type | Description |
397-
| --- | --- | --- |
398-
| url | <code>object</code> | The Path on the server at which the file resource can be accessed |
399-
| [formatObj] | <code>typedef.DataFormatObj</code> | imput options |
400-
401-
**Example**
402-
```javascript
403-
file("/path/to/file", {type: 'turtle'} )
404-
```
405-
406390
## post
407391
##### WOQL.post(url, [formatObj], [source]) ⇒ <code>WOQLQuery</code>
408392
Identifies a resource as a local path on the client, to be sent to the server through a
@@ -1429,6 +1413,20 @@ Gets/Sets woqlClient
14291413
| client | <code>WOQLClient</code> |
14301414

14311415

1416+
## Vars
1417+
##### WOQL.Vars(...varNames) ⇒
1418+
**Returns**: object
1419+
1420+
| Param | Type |
1421+
| --- | --- |
1422+
| ...varNames | <code>string</code> |
1423+
1424+
**Example**
1425+
```javascript
1426+
const v = WOQL.Vars('var01', 'var02', 'var03');
1427+
triple(v.var01, v.var02, v.var03)
1428+
```
1429+
14321430
## emerge
14331431
##### WOQL.emerge(auto_eval)
14341432
query module

docs/api/woqlclient.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,21 @@ get the database collections list
10711071
client.getBranches()
10721072
```
10731073
1074+
## getCommitsLog
1075+
##### woqlClient.getCommitsLog([dbId]) ⇒ <code>Promise</code>
1076+
get the database collections list
1077+
1078+
**Returns**: <code>Promise</code> - A promise that returns the call response object, or an Error if rejected.
1079+
1080+
| Param | Type | Description |
1081+
| --- | --- | --- |
1082+
| [dbId] | <code>string</code> | the database id |
1083+
1084+
**Example**
1085+
```javascript
1086+
client.getCommitsLog()
1087+
```
1088+
10741089
## getPrefixes
10751090
##### woqlClient.getPrefixes([dbId]) ⇒ <code>Promise</code>
10761091
get the database prefixes object

0 commit comments

Comments
 (0)