import { UserIdentity } from '../keystore' ; import { Query } from '../query/query' ; import { FactPath , FactRecord , FactReference } from '../storage' ; export interface Authorization { getUserFact ( userIdentity ) : Promise < FactRecord > ; query ( userIdentity , start , query ) : Promise < FactPath [ ] > ; load ( userIdentity , references ) : Promise < FactRecord [ ] > ; save ( userIdentity , facts ) : Promise < FactRecord [ ] > ; }