import { AppFilters , Network , SubscriptionCallback , SubscriptionHandler , } from '@aragon/connect-types' ; import { ConnectionContext } from '../types' ; import App from '../entities/App' ; import Organization from '../entities/Organization' ; import Permission from '../entities/Permission' ; import Repo from '../entities/Repo' ; import Role from '../entities/Role' ; export default interface IOrganizationConnector { readonly name : string ; readonly network : Network ; readonly config : { [ key ] : any ; } ; connect ? ( connection ) : Promise < void > ; disconnect ? ( ) : Promise < void > ; appByAddress ( organization , appAddress ) : Promise < App > ; appForOrg ( organization , filters ? ) : Promise < App > ; onAppForOrg ( organization , filters , callback ) : SubscriptionHandler ; appsForOrg ( organization , filters ? ) : Promise < App [ ] > ; onAppsForOrg ( organization , filters , callback ) : SubscriptionHandler ; permissionsForOrg ( organization ) : Promise < Permission [ ] > ; onPermissionsForOrg ( organization , callback ) : SubscriptionHandler ; repoForApp ( organization , appAddress ) : Promise < Repo > ; rolesForAddress ( organization , appAddress ) : Promise < Role [ ] > ; }