Skip to content

Commit 5676db6

Browse files
Francesca-Bitgithub-actions[bot]
authored andcommitted
Apply docs changes
1 parent 849733f commit 5676db6

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
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: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,30 @@ If you would like to change branch or commit before apply use client.checkout("b
13831383
**Example**
13841384
```javascript
13851385
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=>{
13871410
console.log(result)
13881411
})
13891412
```

0 commit comments

Comments
 (0)