Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,6 @@
- [generateCommitDescriptor](api/woqlClient.js?id=generateCommitDescriptor)
- [prepareRevisionControlArgs](api/woqlClient.js?id=prepareRevisionControlArgs)
- [updateDatabase](api/woqlClient.js?id=updateDatabase)
- [createUser](api/woqlClient.js?id=createUser)
- [getUser](api/woqlClient.js?id=getUser)
- [updateUser](api/woqlClient.js?id=updateUser)
- [deleteUser](api/woqlClient.js?id=deleteUser)
- [createOrganization](api/woqlClient.js?id=createOrganization)
- [setOrganizationRoles](api/woqlClient.js?id=setOrganizationRoles)
- [getOrganization](api/woqlClient.js?id=getOrganization)
- [updateOrganization](api/woqlClient.js?id=updateOrganization)
- [deleteOrganization](api/woqlClient.js?id=deleteOrganization)
- [getRoles](api/woqlClient.js?id=getRoles)
- [updateRoles](api/woqlClient.js?id=updateRoles)
- [addDocument](api/woqlClient.js?id=addDocument)
- [queryDocument](api/woqlClient.js?id=queryDocument)
- [getDocument](api/woqlClient.js?id=getDocument)
Expand All @@ -75,7 +64,8 @@
- [comment](api/woql.js?id=comment)
- [select](api/woql.js?id=select)
- [distinct](api/woql.js?id=distinct)
- [and](api/woql.js?id=an)
- [and](api/woql.js?id=and)
- [read_object](api/woql.js?id=read_object)
- [or](api/woql.js?id=or)
- [from](api/woql.js?id=from)
- [into](api/woql.js?id=into)
Expand Down
45 changes: 0 additions & 45 deletions docs/api/typedef.js.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,4 @@
## Typedefs

<dl>
<dt><a href="#DocParamsGet">DocParamsGet</a> : <code>Object</code></dt>
<dd><p>the GET document interface query parameters</p>
</dd>
<dt><a href="#DocParamsPost">DocParamsPost</a> : <code>Object</code></dt>
<dd><p>the POST document interface query parameters</p>
</dd>
<dt><a href="#DocParamsPut">DocParamsPut</a> : <code>Object</code></dt>
<dd><p>the PUT document interface query parameters</p>
</dd>
<dt><a href="#DocParamsDelete">DocParamsDelete</a> : <code>Object</code></dt>
<dd><p>the DELETE document interface query parameters</p>
</dd>
<dt><a href="#GraphRef">GraphRef</a> : <code>&quot;schema/main&quot;</code> | <code>&quot;instance/main&quot;</code> | <code>string</code></dt>
<dd></dd>
<dt><a href="#DataFormatObj">DataFormatObj</a> : <code>Object</code></dt>
<dd><p>(export/import)</p>
</dd>
<dt><a href="#FuntionType">FuntionType</a> : <code>&quot;add_quad&quot;</code> | <code>&quot;delete_quad&quot;</code> | <code>&quot;add_triple&quot;</code> | <code>&quot;delete_triple&quot;</code> | <code>&quot;quad&quot;</code> | <code>&quot;triple&quot;</code></dt>
<dd></dd>
<dt><a href="#ResourceType">ResourceType</a> : <code>&quot;commits&quot;</code> | <code>&quot;meta&quot;</code> | <code>&quot;branch&quot;</code> | <code>&quot;ref&quot;</code> | <code>&quot;repo&quot;</code> | <code>&quot;db&quot;</code></dt>
<dd></dd>
<dt><a href="#GraphType">GraphType</a> : <code>&quot;instance&quot;</code> | <code>&quot;schema&quot;</code></dt>
<dd></dd>
<dt><a href="#CredentialObj">CredentialObj</a> : <code>Object</code></dt>
<dd></dd>
<dt><a href="#ActionType">ActionType</a> : <code>&#x27;graph&#x27;</code> | <code>&#x27;db&#x27;</code> | <code>&#x27;clone&#x27;</code> | <code>&#x27;triples&#x27;</code> | <code>&#x27;woql&#x27;</code> | <code>&#x27;fetch&#x27;</code> | <code>&#x27;pull&#x27;</code> | <code>&#x27;rebase&#x27;</code> | <code>&#x27;branch&#x27;</code> | <code>&#x27;reset&#x27;</code> | <code>&#x27;push&#x27;</code> | <code>&#x27;squash&#x27;</code></dt>
<dd></dd>
<dt><a href="#ParamsObj">ParamsObj</a> : <code>Object</code></dt>
<dd></dd>
<dt><a href="#RolesObj">RolesObj</a> : <code>Object</code></dt>
<dd></dd>
<dt><a href="#RepoType">RepoType</a> : <code>&quot;local&quot;</code> | <code>&quot;remote&quot;</code></dt>
<dd></dd>
<dt><a href="#DbDetails">DbDetails</a> : <code>Object</code></dt>
<dd></dd>
<dt><a href="#RemoteRepoDetails">RemoteRepoDetails</a> : <code>Object</code></dt>
<dd><p>{remote: &quot;origin&quot;, &quot;remote_branch&quot;: &quot;main&quot;, &quot;author&quot;: &quot;admin&quot;, &quot;message&quot;: &quot;message&quot;}</p>
</dd>
<dt><a href="#CloneSourceDetails">CloneSourceDetails</a> : <code>Object</code></dt>
<dd></dd>
</dl>


## DocParamsGet
#### DocParamsGet : <code>Object</code>
the GET document interface query parameters
Expand Down
15 changes: 14 additions & 1 deletion docs/api/woql.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,19 @@ WOQL.and(
WOQL.triple("v:Start", "label", "v:Start_Label"))
```

### read_object
#### WOQL.read\_object(IRI, output, formatObj) ⇒ <code>object</code>
Read a node identified by an IRI as a JSON-LD document

**Returns**: <code>object</code> - WOQLQuery

| Param | Type | Description |
| --- | --- | --- |
| IRI | <code>string</code> | The document id or a variable |
| output | <code>string</code> | variable name |
| formatObj | <code>object</code> | |


### or
#### WOQL.or(...subqueries) ⇒ <code>WOQLQuery</code>
Creates a logical OR of the arguments
Expand Down Expand Up @@ -964,7 +977,7 @@ Casts the value of Input to a new value of type Type and stores the result in Ca

**Example**
```js
typecast("22/3/98", "xsd:dateTime", "v:time")
cast("22/3/98", "xsd:dateTime", "v:time")
```

### order_by
Expand Down
135 changes: 0 additions & 135 deletions docs/api/woqlClient.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -648,141 +648,6 @@ update the database details
| dbDoc | <code>object</code> | an object that describe the database details |


### createUser
#### woqlClient.createUser(userId, userDoc) ⇒ <code>Promise</code>
For creating an user

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

| Param | Type | Description |
| --- | --- | --- |
| userId | <code>string</code> | the userId |
| userDoc | <code>object</code> | the user's object description |


### getUser
#### woqlClient.getUser(userId) ⇒ <code>Promise</code>
Get the logged user details.

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

| Param | Type |
| --- | --- |
| userId | <code>string</code> |


### updateUser
#### woqlClient.updateUser(userId, userDoc) ⇒ <code>Promise</code>
Update an user from the database.

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

| Param | Type | Description |
| --- | --- | --- |
| userId | <code>string</code> | |
| userDoc | <code>object</code> | User Object details |


### deleteUser
#### woqlClient.deleteUser(userId) ⇒ <code>Promise</code>
Delete an user from the database Only a user with DBA authority can delete a user.

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

| Param | Type |
| --- | --- |
| userId | <code>string</code> |


### createOrganization
#### woqlClient.createOrganization(orgId, orgDoc) ⇒ <code>Promise</code>
Create a new organization for the registered user

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

| Param | Type | Description |
| --- | --- | --- |
| orgId | <code>string</code> | the organization id |
| orgDoc | <code>object</code> | An object that describe the organization's details |


### setOrganizationRoles
#### woqlClient.setOrganizationRoles(orgId, orgDoc) ⇒ <code>Promise</code>
Create a new organization for the registered user

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

| Param | Type | Description |
| --- | --- | --- |
| orgId | <code>string</code> | the organization id |
| orgDoc | <code>object</code> | An object that describe the organization's details |


### getOrganization
#### woqlClient.getOrganization(orgId, [action]) ⇒ <code>Promise</code>
Gets all the information about the given organization

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

| Param | Type | Description |
| --- | --- | --- |
| orgId | <code>string</code> | the organization id |
| [action] | <code>string</code> | set an action like recommendations | invitations | collaborators |


### updateOrganization
#### woqlClient.updateOrganization(orgId, orgDoc) ⇒ <code>Promise</code>
only if you have the permission you can delete an organization
Before you can delete the organization, you must first remove all accounts and databases
from the organization

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

| Param | Type | Description |
| --- | --- | --- |
| orgId | <code>string</code> | the organization id |
| orgDoc | <code>object</code> | the organization details description |


### deleteOrganization
#### woqlClient.deleteOrganization(orgId) ⇒ <code>Promise</code>
only if you have the permission you can delete an organization
Before you can delete the organization, you must first remove all accounts and databases
from the organization

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

| Param | Type | Description |
| --- | --- | --- |
| orgId | <code>string</code> | the organization id |


### getRoles
#### woqlClient.getRoles([userId], [orgId], [dbId]) ⇒ <code>Promise</code>
get all the user roles (for the current logged user)
or the user roles for a specific database and user
(the logged used need to have the permission to see the roles info for another user)

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

| Param | Type | Description |
| --- | --- | --- |
| [userId] | <code>string</code> | the user id |
| [orgId] | <code>string</code> | the organization id |
| [dbId] | <code>string</code> | the dbId |


### updateRoles
#### woqlClient.updateRoles(newRolesObj) ⇒ <code>Promise</code>
Change the user role for existing users in your organization, including your own

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

| Param | Type |
| --- | --- |
| newRolesObj | <code>typedef.RolesObj</code> |


### addDocument
#### woqlClient.addDocument(json, [params], [dbId], [string]) ⇒ <code>Promise</code>
to add a new document or a list of new documents into the instance or the schema graph.
Expand Down
8 changes: 8 additions & 0 deletions lib/woql.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ WOQL.and = function(...subqueries) {
}


/**
* Read a node identified by an IRI as a JSON-LD document
* @param {string} IRI - The document id or a variable
* @param {string} output - variable name
* @param {object} formatObj
* @return {object} WOQLQuery
*/

WOQL.read_object = function(IRI, output, formatObj) {
return new WOQLQuery().read_object(IRI, output, formatObj)
}
Expand Down
Loading