diff --git a/app/definitions/rest/v1/channels.ts b/app/definitions/rest/v1/channels.ts index acdd87e26..51a6a8e27 100644 --- a/app/definitions/rest/v1/channels.ts +++ b/app/definitions/rest/v1/channels.ts @@ -52,6 +52,9 @@ export type ChannelsEndpoints = { 'channels.convertToTeam': { POST: (params: { channelId: string; channelName: string }) => { team: ITeam }; }; + 'channels.delete': { + POST: (params: { roomId: string }) => {}; + }; 'channels.leave': { POST: (params: { roomId: string }) => {}; }; diff --git a/app/definitions/rest/v1/groups.ts b/app/definitions/rest/v1/groups.ts index 8d77cb3a8..ba40d2cb3 100644 --- a/app/definitions/rest/v1/groups.ts +++ b/app/definitions/rest/v1/groups.ts @@ -46,6 +46,9 @@ export type GroupsEndpoints = { 'groups.convertToTeam': { POST: (params: { roomId: string; roomName: string }) => { team: ITeam }; }; + 'groups.delete': { + POST: (params: { roomId: string }) => {}; + }; 'groups.leave': { POST: (params: { roomId: string }) => {}; }; diff --git a/app/definitions/rest/v1/im.ts b/app/definitions/rest/v1/im.ts index 5bdc274e3..5dd3238cf 100644 --- a/app/definitions/rest/v1/im.ts +++ b/app/definitions/rest/v1/im.ts @@ -38,6 +38,9 @@ export type ImEndpoints = { messages: IMessageFromServer[]; }; }; + 'im.delete': { + POST: (params: { roomId: string }) => {}; + }; 'im.leave': { POST: (params: { roomId: string }) => {}; }; diff --git a/app/lib/rocketchat/services/restApi.ts b/app/lib/rocketchat/services/restApi.ts index 96331c20a..46ad6190d 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -432,10 +432,8 @@ export const leaveRoom = (roomId: string, t: RoomTypes) => // RC 0.48.0 sdk.post(`${roomTypeToApiType(t)}.leave`, { roomId }); -export const deleteRoom = (roomId: string, t: RoomTypes): any => +export const deleteRoom = (roomId: string, t: RoomTypes) => // RC 0.49.0 - // TODO: missing definitions from server - // @ts-ignore sdk.post(`${roomTypeToApiType(t)}.delete`, { roomId }); export const toggleMuteUserInRoom = (rid: string, username: string, mute: boolean) => {