Rocket.Chat.Apps-engine icon indicating copy to clipboard operation
Rocket.Chat.Apps-engine copied to clipboard

[BREAK] API updates

Open d-gubert opened this issue 3 years ago • 0 comments

What? :boat:

Remove deprecated methods and behaviors for version 2.0

Methods that will be removed:

  • App.getAppUsername() - Developers should use IRead.getUserReader().getAppUser() instead
  • ILivechatRead.getLivechatVisitors(query) - There are alternative methods available in the ILivechatRead interface that allow specific querying of visitors
  • IRoomBuilder.addUsername(username) - Replace with addMemberToBeAddedByUsername method of the same interface
  • IRoomBuilder.setUsernames(usernames) - Replace with setMembersByUsernames method of the same interface
  • IRoomBuilder.getUsernames() - Replace with getMembersUsernames of the same interface
  • ILivechatRead.isOnlineAsync() - Replace with isOnline, which will change to be an async method

Events that will be removed:

  • ILivechatRoomClosedHandler - Developers should use IPostLivechatRoomClosed instead

Methods that will suffer breaking changes:

  • ILivechatRead.isOnline(departmentId?) - Return type will change from boolean to Promise<boolean>
  • IUserRead.getAppUser(appId?) - The parameter appId will be removed

Data types that will suffer breaking changes:

  • IRoom - property usernames will be removed; To get the members of a room (users inside a room), use the IRoomRead.getMembers() method.

Links :earth_americas:

Need to update dependency on this PR later https://github.com/RocketChat/Rocket.Chat/pull/27696

PS :eyes:

d-gubert avatar Dec 29 '22 17:12 d-gubert