import { browser } from 'protractor' ; import { NodesApi , SitesApi , FavoritesApi , QueriesApi , SharedLinksApi , SearchApi , UploadApi } from './apis' ; import { AlfrescoApi } from '@alfresco/js-api' ; deprecated export class RepoClient { alfrescoApi : AlfrescoApi ; constructor ( private username = browser . params . ADMIN_USERNAME , private password = browser . params . ADMIN_PASSWORD ) { this . alfrescoApi = new AlfrescoApi ( ) ; this . alfrescoApi . setConfig ( browser . params . config ) ; } apiAuth ( ) { return this . alfrescoApi . login ( this . username , this . password ) ; } get nodes ( ) : NodesApi { return new NodesApi ( this . username , this . password ) ; } get sites ( ) : SitesApi { return new SitesApi ( this . username , this . password ) ; } get favorites ( ) : FavoritesApi { return new FavoritesApi ( this . username , this . password ) ; } get shared ( ) : SharedLinksApi { return new SharedLinksApi ( this . username , this . password ) ; } get search ( ) : SearchApi { return new SearchApi ( this . username , this . password ) ; } get queries ( ) : QueriesApi { return new QueriesApi ( this . username , this . password ) ; } get upload ( ) : UploadApi { return new UploadApi ( this . username , this . password ) ; } async logout ( ) { await this . apiAuth ( ) ; return this . alfrescoApi . logout ( ) ; } }