File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -200,3 +200,15 @@ the manage capability command type
200
200
##### RolesActions: ` Array.<ACTIONS> `
201
201
[ ACTIONS.CREATE_DATABASE | ACTIONS.DELETE_DATABASE]
202
202
203
+
204
+ ## DocHistoryParams
205
+ ##### DocHistoryParams: ` Object `
206
+ ** Properties**
207
+
208
+ | Name | Type | Description |
209
+ | --- | --- | --- |
210
+ | [ start] | <code >number</code > | Index to start from, 0 is the default |
211
+ | [ count] | <code >number</code > | Amount of commits to show, 10 is the default |
212
+ | [ updated] | <code >boolean</code > | Last updated time (excludes history) false is the default |
213
+ | [ created] | <code >boolean</code > | Created date of object (excludes history) false is the default |
214
+
Original file line number Diff line number Diff line change @@ -1383,7 +1383,30 @@ If you would like to change branch or commit before apply use client.checkout("b
1383
1383
**Example**
1384
1384
` ` ` javascript
1385
1385
client .checkout (" mybranch" )
1386
- client .apply (" main" ," mybranch" ," merge main" ).then (result => {
1386
+ client .apply (" mybranch" ," mybranch_new" ," merge main" ).then (result => {
1387
+ console .log (result)
1388
+ })
1389
+ ` ` `
1390
+
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 => {
1387
1410
console .log (result)
1388
1411
})
1389
1412
` ` `
You can’t perform that action at this time.
0 commit comments