diff --git a/src/types/IMatrixClient.ts b/src/types/IMatrixClient.ts index 36923dd4d5fb30c4e47c16a589d18052d4fc400d..6d6e23c92880701a0c077fb631cb585a850aa352 100644 --- a/src/types/IMatrixClient.ts +++ b/src/types/IMatrixClient.ts @@ -1,6 +1,21 @@ export interface IMatrixClient { + /** + * Register an account with the given credentials; this method must complete all the stages with no further user interaction. + */ register(username: string, password: string, initialDeviceDisplayName: string): Promise<void>; + login(username: string, password: string): Promise<void>; - showRoom(roomId: string): Promise<void>; + + /** + * Try to start the client with a previous login + * @returns true if successful, false otherwise + */ attemptStartWithExistingSession(): Promise<boolean>; + + /** + * Renders a timeline for the given room. + * @remarks This method should join the room if needed. + * @param roomId internal room-id, not alias + */ + showRoom(roomId: string): Promise<void>; }