@@ -17,6 +17,18 @@ type CmisObjects struct {
17
17
type NodeRes struct {
18
18
Entry Node `json:"entry"`
19
19
}
20
+ type NodesRes struct {
21
+ List struct {
22
+ Pagination struct {
23
+ Count int `json:"count"`
24
+ HasMoreItems bool `json:"hasMoreItems"`
25
+ TotalItems int `json:"totalItems"`
26
+ SkipCount int `json:"skipCount"`
27
+ MaxItems int `json:"maxItems"`
28
+ } `json:"pagination"`
29
+ Entries []NodeRes `json:"entries"`
30
+ } `json:"list"`
31
+ }
20
32
type Copy struct {
21
33
TargetParentId string `json:"targetParentId"`
22
34
}
@@ -33,6 +45,18 @@ func (c *Client) GetNodeId(path string, limit int) (string, error) {
33
45
return response .Objects [0 ].Object .Properties .ParentId .Value , nil
34
46
}
35
47
48
+ func (c * Client ) GetDeletedNodes () (* NodesRes , error ) {
49
+ req , err := http .NewRequest ("GET" , c .getUrl ()+ "/alfresco/api/-default-/public/alfresco/versions/1/deleted-nodes?include=properties&maxItems=10000" , nil )
50
+ if err != nil {
51
+ return & NodesRes {}, err
52
+ }
53
+ response := & NodesRes {}
54
+ if _ , _ , err = c .doRequest (req , response ); err != nil {
55
+ return response , err
56
+ }
57
+ return response , nil
58
+ }
59
+
36
60
func (c * Client ) GetNodeChilds (path string , limit int ) (* CmisObjects , error ) {
37
61
req , err := http .NewRequest ("GET" , c .getUrl ()+ "/alfresco/api/-default-/public/cmis/versions/1.1/browser/root/" + path + "?maxItems=" + strconv .Itoa (limit )+ "&cmisselector=children" , nil )
38
62
if err != nil {
0 commit comments