import { MatrixClient } from "./MatrixClient" ; import { SynapseAdminApis } from "./SynapseAdminApis" ; category export interface WhoisInfo { user_id : string ; devices : { [ device_id ] : { sessions : [ { connections : WhoisConnectionInfo [ ] ; } ] ; } ; } ; } interface WhoisConnectionInfo { /**
     * Most recently seen IP address of the session.
     */ ip : string ; /**
     * Unix timestamp that the session was last active.
     */ last_seen : number ; /**
     * User agent string last seen in the session.
     */ user_agent : string ; } category export class AdminApis { constructor ( private client ) { } /**
     * Gets access to the Synapse administrative APIs object.
     */ public get synapse ( ) : SynapseAdminApis { return new SynapseAdminApis ( this . client ) ; } param { string } userId returns { Promise < WhoisInfo > } public whoisUser ( userId ) { return this . client . doRequest ( "GET" , "/_matrix/client/r0/admin/whois/" + encodeURIComponent ( userId ) ) ; } }