Chore: Migrate REST API - deleteRoom to Typescript (#3834)

This commit is contained in:
Gleidson Daniel Silva 2022-03-07 09:33:58 -03:00 committed by GitHub
parent 892e919768
commit 256bf0eaee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View File

@ -52,6 +52,9 @@ export type ChannelsEndpoints = {
'channels.convertToTeam': { 'channels.convertToTeam': {
POST: (params: { channelId: string; channelName: string }) => { team: ITeam }; POST: (params: { channelId: string; channelName: string }) => { team: ITeam };
}; };
'channels.delete': {
POST: (params: { roomId: string }) => {};
};
'channels.leave': { 'channels.leave': {
POST: (params: { roomId: string }) => {}; POST: (params: { roomId: string }) => {};
}; };

View File

@ -46,6 +46,9 @@ export type GroupsEndpoints = {
'groups.convertToTeam': { 'groups.convertToTeam': {
POST: (params: { roomId: string; roomName: string }) => { team: ITeam }; POST: (params: { roomId: string; roomName: string }) => { team: ITeam };
}; };
'groups.delete': {
POST: (params: { roomId: string }) => {};
};
'groups.leave': { 'groups.leave': {
POST: (params: { roomId: string }) => {}; POST: (params: { roomId: string }) => {};
}; };

View File

@ -38,6 +38,9 @@ export type ImEndpoints = {
messages: IMessageFromServer[]; messages: IMessageFromServer[];
}; };
}; };
'im.delete': {
POST: (params: { roomId: string }) => {};
};
'im.leave': { 'im.leave': {
POST: (params: { roomId: string }) => {}; POST: (params: { roomId: string }) => {};
}; };

View File

@ -432,10 +432,8 @@ export const leaveRoom = (roomId: string, t: RoomTypes) =>
// RC 0.48.0 // RC 0.48.0
sdk.post(`${roomTypeToApiType(t)}.leave`, { roomId }); 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 // RC 0.49.0
// TODO: missing definitions from server
// @ts-ignore
sdk.post(`${roomTypeToApiType(t)}.delete`, { roomId }); sdk.post(`${roomTypeToApiType(t)}.delete`, { roomId });
export const toggleMuteUserInRoom = (rid: string, username: string, mute: boolean) => { export const toggleMuteUserInRoom = (rid: string, username: string, mute: boolean) => {