Skip to content

Commit 67c89d4

Browse files
committed
documentation - document interface, add raw_json parameter
1 parent 08927d9 commit 67c89d4

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

lib/accessControl.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ AccessControl.prototype.getAPIUrl = function (cloudAPIUrl) {
126126
return `${cloudAPIUrl}api`;
127127
};
128128

129+
129130
AccessControl.prototype.dispatch = function (requestUrl, action, payload) {
130131
if (!requestUrl) {
131132
return Promise.reject(

lib/typedef.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ const { ACTIONS } = require('./utils');
2727

2828
/**
2929
*@typedef {Object} DocParamsPost - the POST document interface query parameters
30+
*@property {boolean} [raw_json] - default is false, If true, the input documents
31+
are treated as raw JSON, inserted as type sys:JSONDocument and are not subject
32+
to schema restrictions.
3033
*@property {GraphType} [graph_type] - default is instance instance|schema Used to switch between
3134
getting documents from the instance or the schema graph.
3235
*@property {boolean} [full_replace] - default is false, If true, all existing documents are deleted
@@ -36,6 +39,9 @@ const { ACTIONS } = require('./utils');
3639

3740
/**
3841
*@typedef {Object} DocParamsPut - the PUT document interface query parameters
42+
*@property {boolean} [raw_json] - default is false, If true, the input documents
43+
are treated as raw JSON, inserted as type sys:JSONDocument and are not subject
44+
to schema restrictions.
3945
*@property {GraphType} [graph_type] - default is instance, instance|schema Used to switch between
4046
getting documents from the instance or the schema graph.
4147
*/

lib/woqlClient.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ WOQLClient.prototype.updateDatabase = function (dbDoc) {
942942
/**
943943
* to add a new document or a list of new documents into the instance or the schema graph.
944944
* @param {object} json
945-
* @param {typedef.DocParamsPost} [params] - the post parameters
945+
* @param {typedef.DocParamsPost} [params] - the post parameters {@link #typedef.DocParamsPost}
946946
* @param {string} [dbId] - the dbid
947947
* @param {message} [string] - the insert commit message
948948
* @param {string} [lastDataVersion] the last data version tracking id.
@@ -1159,7 +1159,7 @@ WOQLClient.prototype.getDocument = function (params, dbId, branch, lastDataVersi
11591159
/**
11601160
*
11611161
* @param {object} json
1162-
* @param {typedef.DocParamsPut} [params] - the Put parameters
1162+
* @param {typedef.DocParamsPut} [params] - the Put parameters {@link #typedef.DocParamsPut}
11631163
* @param {*} [dbId] - the database id
11641164
* @param {*} [message] - the update commit message
11651165
* @param {string} [lastDataVersion] the last data version tracking id.

0 commit comments

Comments
 (0)