import { Observable } from 'rxjs' ; import { VcsAccount , VcsAuthenticationInfo , VcsRemoteRepository } from '../../../core/vcs' ; export abstract class VcsRemoteProvider { protected constructor ( /** The name of vcs remote provider */ public readonly name , /** API url for vcs remote provider */ public readonly apiUrl ) { } /** Authorize vcs remote service with basic. */ abstract authorizeByBasic ( username , password ) ; /** Authorize vcs remote service with oauth2 token. */ abstract authorizeByOauth2Token ( token ) ; /** Get email list address for a user. */ abstract getPrimaryEmail ( authInfo ) ; /** Check is url of repository is valid. */ abstract isRepositoryUrlValid ( url ) ; /** Find repository at url with authentication info if its provided. */ abstract findRepository ( url , authInfo ? ) ; }