export type AccessKeyId = string ; export type AccessKeyMetricsId = string ; export interface ProxyParams { readonly hostname : string ; readonly portNumber : number ; readonly encryptionMethod : string ; readonly password : string ; } export interface DataLimit { readonly bytes : number ; } export interface AccessKey { readonly id : AccessKeyId ; readonly name : string ; readonly metricsId : AccessKeyMetricsId ; readonly proxyParams : ProxyParams ; readonly isOverDataLimit : boolean ; readonly dataLimit ? : DataLimit ; } export interface AccessKeyRepository { createNewAccessKey ( ) : Promise < AccessKey > ; removeAccessKey ( id ) ; listAccessKeys ( ) : AccessKey [ ] ; setPortForNewAccessKeys ( port ) : Promise < void > ; setHostname ( hostname ) : void ; renameAccessKey ( id , name ) : void ; getMetricsId ( id ) : AccessKeyMetricsId | undefined ; setDefaultDataLimit ( limit ) : void ; removeDefaultDataLimit ( ) : void ; setAccessKeyDataLimit ( id , limit ) : void ; removeAccessKeyDataLimit ( id ) : void ; }