Skip to content

Commit

Permalink
[MNT-24575] Added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
swapnil-verma-gl committed Dec 6, 2024
1 parent fd205ba commit 88e99ac
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/content-services/src/lib/common/services/nodes-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,21 @@ export class NodesApiService {
return this.createNodeInsideRoot(name || this.randomNodeName(), nodeType, properties, path);
}

/**
* Initiate a new request to calculate folder size.
* @param nodeId Node Id
* @returns The job id which can be used to track request status
*/
initiateFolderSizeCalculation(nodeId: string): Observable<JobIdBodyEntry> {
return from(this.nodesApi.initialFolderSizeCalculation(nodeId));
}

/**
* Gets the size of a folder.
* @param nodeId Node Id
* @param jobId Job Id
* @returns Folder details
*/
getFolderSizeInfo(nodeId: string, jobId: string): Observable<SizeDetailsEntry> {
return from(this.nodesApi.getFolderSizeInfo(nodeId, jobId));
}
Expand Down
18 changes: 18 additions & 0 deletions lib/js-api/src/api/content-rest-api/api/nodes.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,14 @@ export class NodesApi extends BaseApi {
});
}

/**
* Initiate a new request to calculate folder size.
*
* **Note:** this endpoint is available in Alfresco 7.1 and newer versions.
*
* @param nodeId Node Id
* @returns The job id which can be used to track request status
*/
initialFolderSizeCalculation(nodeId: string): Promise<JobIdBodyEntry> {
throwIfNotDefined(nodeId, 'nodeId');

Expand All @@ -999,6 +1007,16 @@ export class NodesApi extends BaseApi {
});
}

/**
* Gets the size of a folder.
*
* **Note:** this endpoint is available in Alfresco 7.1 and newer versions.
*
* @param nodeId Node Id
* @param jobId Job Id
* @returns Folder details
*/

getFolderSizeInfo(nodeId: string, jobId: string): Promise<SizeDetailsEntry> {
throwIfNotDefined(nodeId, 'nodeId');
throwIfNotDefined(jobId, 'jobId');
Expand Down

0 comments on commit 88e99ac

Please sign in to comment.