mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-08 14:51:14 +00:00
upgrade to latest JS-API and ADF (#896)
* improved update script and latest ADF libs * upgrade to latest js-api and ADF * upgrade tests * update viewer code * use @alfresco/js-api * update to latest adf * fix deprecation issues * update viewer * fix copy/move dialog * change expect * fix remove site from favorites * fix unit test * update adf version * use ADF upload dialog
This commit is contained in:
@@ -25,8 +25,10 @@
|
||||
|
||||
import { RepoApi } from '../repo-api';
|
||||
import { Utils } from '../../../../utilities/utils';
|
||||
import { TrashcanApi as AdfTrashcanApi} from '@alfresco/js-api';
|
||||
|
||||
export class TrashcanApi extends RepoApi {
|
||||
trashcanApi = new AdfTrashcanApi(this.alfrescoJsApi);
|
||||
|
||||
constructor(username?, password?) {
|
||||
super(username, password);
|
||||
@@ -34,12 +36,12 @@ export class TrashcanApi extends RepoApi {
|
||||
|
||||
async permanentlyDelete(id: string) {
|
||||
await this.apiAuth();
|
||||
return await this.alfrescoJsApi.core.nodesApi.purgeDeletedNode(id);
|
||||
return await this.trashcanApi.deleteDeletedNode(id);
|
||||
}
|
||||
|
||||
async restore(id: string) {
|
||||
await this.apiAuth();
|
||||
return await this.alfrescoJsApi.core.nodesApi.restoreNode(id);
|
||||
return await this.trashcanApi.restoreDeletedNode(id);
|
||||
}
|
||||
|
||||
async getDeletedNodes() {
|
||||
@@ -47,7 +49,7 @@ export class TrashcanApi extends RepoApi {
|
||||
maxItems: 1000
|
||||
};
|
||||
await this.apiAuth();
|
||||
return await this.alfrescoJsApi.core.nodesApi.getDeletedNodes(opts);
|
||||
return await this.trashcanApi.listDeletedNodes(opts);
|
||||
}
|
||||
|
||||
async emptyTrash() {
|
||||
|
Reference in New Issue
Block a user