Skip to content

Commit 38c52ed

Browse files
Francesca-Bitgithub-actions[bot]
authored andcommitted
Apply docs changes
1 parent 0c1afdd commit 38c52ed

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

docs/api/typedef.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,15 @@ the manage capability command type
200200
##### RolesActions: ` Array.<ACTIONS>`
201201
[ACTIONS.CREATE_DATABASE | ACTIONS.DELETE_DATABASE]
202202

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+

docs/api/woqlclient.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,6 +1388,29 @@ client.apply("main","mybranch","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+
13911414
## sendCustomRequest
13921415
##### woqlClient.sendCustomRequest(requestType, customRequestURL, [payload]) ⇒ <code>Promise</code>
13931416
Call a custom Api endpoit

0 commit comments

Comments
 (0)