Skip to content

Commit 9641f09

Browse files
Francesca-Bitgithub-actions[bot]
authored andcommitted
Apply docs changes
1 parent a6496cc commit 9641f09

File tree

2 files changed

+15
-27
lines changed

2 files changed

+15
-27
lines changed

docs/api/typedef.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,14 @@ the manage capability command type
212212
| [updated] | <code>boolean</code> | Last updated time (excludes history) false is the default |
213213
| [created] | <code>boolean</code> | Created date of object (excludes history) false is the default |
214214

215+
216+
## DiffObject
217+
##### DiffObject: ` Object`
218+
**Properties**
219+
220+
| Name | Type | Description |
221+
| --- | --- | --- |
222+
| [Object] | <code>keep</code> | Index to start from, 0 is the default |
223+
| [number] | <code>start</code> | Amount of commits to show, 10 is the default |
224+
| [number] | <code>count</code> | Last updated time (excludes history) false is the default |
225+

docs/api/woqlclient.md

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ Get the patch of difference between branches or commits.
13371337
| beforeVersion | <code>string</code> | Before branch/commit to compare |
13381338
| afterVersion | <code>string</code> | After branch/commit to compare |
13391339
| [id] | <code>string</code> | The document id to be diffed, if it is omitted all the documents will be compared |
1340-
| [options] | <code>object</code> | {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. |
1340+
| [options] | <code>typedef.DiffObject</code> | {keep:{},count:10,start:0} 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. |
13411341
13421342
**Example**
13431343
```javascript
@@ -1360,7 +1360,7 @@ client.getVersionDiff("main", afterCommit, "Person/Tom" ).then(diffResult=>{
13601360
})
13611361

13621362
//This is to view the changes between two branches with the keep options
1363-
const options = {"keep":{"@id":true, "name": true}}
1363+
const options = {"keep":{"@id":true, "name": true}, start:0, count:10}
13641364
client.getVersionDiff("main","mybranch",options).then(diffResult=>{
13651365
console.log(diffResult)
13661366
})
@@ -1388,31 +1388,8 @@ client.apply("mybranch","mybranch_new","merge main").then(result=>{
13881388
})
13891389
```
13901390
1391-
## docHistory
1392-
##### woqlClient.docHistory(id, [historyParams])
1393-
Get the document's history for a specific database or branch
1394-
1395-
1396-
| Param | Type | Description |
1397-
| --- | --- | --- |
1398-
| id | <code>string</code> | id of document to report history of |
1399-
| [historyParams] | <code>typedef.DocHistoryParams</code> | |
1400-
1401-
**Example**
1402-
```javascript
1403-
//this will return the last 5 commits for the Person/Anna document
1404-
client.checkout("mybranch")
1405-
client.docHistory("Person/Anna",{start:0,count:5}).then(result=>{
1406-
console.log(result)
1407-
})
1408-
//this will return the last and the first commit for the Person/Anna document
1409-
client.docHistory("Person/Anna",{updated:true,created:true}).then(result=>{
1410-
console.log(result)
1411-
})
1412-
```
1413-
1414-
## docHistory
1415-
##### woqlClient.docHistory(id, [historyParams])
1391+
## getDocumentHistory
1392+
##### woqlClient.getDocumentHistory(id, [historyParams])
14161393
Get the document's history for a specific database or branch
14171394
14181395

0 commit comments

Comments
 (0)