@@ -1320,7 +1320,7 @@ WOQLClient.prototype.updateDocument = function (json, params, dbId, message = 'u
13201320 const docParams = params || { } ;
13211321 docParams . author = this . author ( ) ;
13221322 docParams . message = message ;
1323- if ( docParams . create ) {
1323+ if ( create ) {
13241324 docParams . create = create ;
13251325 }
13261326 if ( dbId ) {
@@ -1585,7 +1585,7 @@ WOQLClient.prototype.userOrganizations = function (orgList) {
15851585 * //{ "@id" : "Person/Jane", "@type" : "Person", "name" : "Jannet" }
15861586 */
15871587WOQLClient . prototype . patch = function ( before , patch ) {
1588- if ( typeof before !== 'object' || typeof after !== 'object' ) {
1588+ if ( typeof before !== 'object' || typeof patch !== 'object' ) {
15891589 const errmsg = '"before" or "after" parameter error - you must specify a valid before and after json document' ;
15901590
15911591 return Promise . reject (
@@ -1743,7 +1743,8 @@ WOQLClient.prototype.getVersionObjectDiff = function (dataVersion, jsonObject, i
17431743 * @param {string } afterVersion - After branch/commit to compare
17441744 * @param {string } [id] - The document id to be diffed,
17451745 * if it is omitted all the documents will be compared
1746- * @param {object } [options] - {keep:{}} Options to send to the diff endpoint.
1746+ * @param {typedef.DiffObject } [options] - {keep:{},count:10,start:0}
1747+ * Options to send to the diff endpoint.
17471748 * The diff api outputs the changes between the input (branches or commits),
17481749 * in options you can list the properties that you would like to see in the diff result in any case.
17491750 * @returns {Promise } A promise that returns the call response object, or an Error if rejected.
@@ -1767,7 +1768,7 @@ WOQLClient.prototype.getVersionObjectDiff = function (dataVersion, jsonObject, i
17671768 * })
17681769 *
17691770 * //This is to view the changes between two branches with the keep options
1770- * const options = {"keep":{"@id":true, "name": true }}
1771+ * const options = {"keep":{"@id":true, "name": true }, start:0, count:10 }
17711772 * client.getVersionDiff("main","mybranch",options).then(diffResult=>{
17721773 * console.log(diffResult)
17731774 * })
@@ -1847,7 +1848,7 @@ WOQLClient.prototype.apply = function (beforeVersion, afterVersion, message, mat
18471848 * })
18481849 */
18491850// eslint-disable-next-line max-len
1850- WOQLClient . prototype . docHistory = function ( id , historyParams ) {
1851+ WOQLClient . prototype . getDocumentHistory = function ( id , historyParams ) {
18511852 const params = historyParams || { } ;
18521853 params . id = id ;
18531854 return this . dispatch (
0 commit comments