diff --git a/docs/README.md b/docs/README.md index b8d463fd..532d76b1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -100,7 +100,7 @@ const bankerSchema = [ "@type":"Class", "@id":"Person", "@key":{ - "@type":"Hash", + "@type":"Lexical", "@fields":[ "name" ] diff --git a/docs/_sidebar.md b/docs/_sidebar.md index adb3b338..f230dcc3 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -60,9 +60,10 @@ - [getPrefixes](api/woqlClient.js?id=getPrefixes) - [getUserOrganizations](api/woqlClient.js?id=getUserOrganizations) - [userOrganizations](api/woqlClient.js?id=userOrganizations) - - [getDiff](api/woqlClient.js?id=getDiff) + - [getJSONDiff](api/woqlClient.js?id=getJSONDiff) - [getVersionObjectDiff](api/woqlClient.js?id=getVersionObjectDiff) - [getVersionDiff](api/woqlClient.js?id=getVersionDiff) + - [apply](api/woqlClient.js?id=apply) - [patch](api/woqlClient.js?id=patch) - [WOQL](api/woql.js?id=WOQL) - [using](api/woql.js?id=using) @@ -169,6 +170,7 @@ - [setApiToken](api/accessControl.js?id=setApiToken) - [setApiKey](api/accessControl.js?id=setApiKey) - [getAPIUrl](api/accessControl.js?id=getAPIUrl) + - [customHeaders](api/accessControl.js?id=customHeaders) - [getAllOrganizations](api/accessControl.js?id=getAllOrganizations) - [createOrganization](api/accessControl.js?id=createOrganization) - [deleteOrganization](api/accessControl.js?id=deleteOrganization) diff --git a/docs/api/woqlclient.md b/docs/api/woqlclient.md index e6447296..8a378f46 100644 --- a/docs/api/woqlclient.md +++ b/docs/api/woqlclient.md @@ -1132,7 +1132,7 @@ Get the patch of difference between two documents. | --- | --- | --- | | before | object | The current state of JSON document | | after | object | The updated state of JSON document | -| [options] | object | {keep:{}} Options to send to the diff endpoint. The diff api outputs the changes between the input (branches or commits), in options you can list the properties that you would like to see in the diff result in any case. | +| [options] | object | {keep:{}} Options to send to the diff endpoint. The diff api outputs the changes between the input, in options you can list the properties that you would like to see in the diff result in any case. | **Example** ```javascript @@ -1157,8 +1157,8 @@ Get the patch of difference between two documents. | --- | --- | --- | | dataVersion | string | The version from which to compare the object | | jsonObject | object | The updated state of JSON document | -| id | string | The object id to be diffed | -| [options] | object | {keep:{}} Options to send to the diff endpoint the diff api outputs the changes between the input (branches or commits), but you can list the properties that you would like to see in the diff result in any case. | +| id | string | The document id to be diffed | +| [options] | object | {keep:{}} Options to send to the diff endpoint the diff api outputs the changes between the input, but you can list the properties that you would like to see in the diff result in any case. | **Example** ```javascript @@ -1244,7 +1244,7 @@ Patch the difference between two documents. **Example** ```javascript -let diffPatch = await client.getDiff( +let diffPatch = await client.getJSONDiff( { "@id": "Person/Jane", "@type": "Person", name: "Jane" }, { "@id": "Person/Jane", "@type": "Person", name: "Janine" } ); diff --git a/lib/woqlClient.js b/lib/woqlClient.js index 6610ab14..ff35ff45 100644 --- a/lib/woqlClient.js +++ b/lib/woqlClient.js @@ -1469,7 +1469,7 @@ WOQLClient.prototype.userOrganizations = function (orgList) { * @param {object} before - The current state of JSON document * @param {object} after - The updated state of JSON document * @param {object} [options] - {keep:{}} Options to send to the diff endpoint. - * The diff api outputs the changes between the input (branches or commits), + * The diff api outputs the changes between the input, * in options you can list the properties that you would like to see in the diff result in any case. * @returns {Promise} A promise that returns the call response object, or an Error if rejected. * @example @@ -1505,9 +1505,9 @@ WOQLClient.prototype.getJSONDiff = function (before, after, options) { * Get the patch of difference between two documents. * @param {string} dataVersion - The version from which to compare the object * @param {object} jsonObject - The updated state of JSON document - * @param {string} id - The object id to be diffed + * @param {string} id - The document id to be diffed * @param {object} [options] - {keep:{}} Options to send to the diff endpoint - * the diff api outputs the changes between the input (branches or commits), + * the diff api outputs the changes between the input, * but you can list the properties that you would like to see in the diff result in any case. * @returns {Promise} A promise that returns the call response object, or an Error if rejected. * @example @@ -1640,7 +1640,7 @@ WOQLClient.prototype.apply = function (beforeVersion, afterVersion, message, mat * @param {object} patch - The patch object * @returns {Promise} A promise that returns the call response object, or an Error if rejected. * @example - * let diffPatch = await client.getDiff( + * let diffPatch = await client.getJSONDiff( * { "@id": "Person/Jane", "@type": "Person", name: "Jane" }, * { "@id": "Person/Jane", "@type": "Person", name: "Janine" } * ); diff --git a/package-lock.json b/package-lock.json index 1c6d5249..70da818e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@terminusdb/terminusdb-client", - "version": "10.0.17", + "version": "10.0.18", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@terminusdb/terminusdb-client", - "version": "10.0.17", + "version": "10.0.18", "license": "Apache-2.0", "dependencies": { "ajv": ">=6.12.3", diff --git a/package.json b/package.json index 28442448..4895da30 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@terminusdb/terminusdb-client", - "version": "10.0.17", + "version": "10.0.18", "description": "TerminusDB client library", "main": "index.js", "types": "./dist/typescript/index.d.ts",