Chore: Migrate REST API - hideRoom to Typescript (#3832)

This commit is contained in:
Gleidson Daniel Silva 2022-03-07 09:57:57 -03:00 committed by GitHub
parent 82439159a5
commit 1ef9f57f3d
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.close': {
POST: (params: { roomId: string }) => {};
};
'channels.kick': { 'channels.kick': {
POST: (params: { roomId: string; userId: string }) => {}; POST: (params: { roomId: string; userId: 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.close': {
POST: (params: { roomId: string }) => {};
};
'groups.kick': { 'groups.kick': {
POST: (params: { roomId: string; userId: string }) => {}; POST: (params: { roomId: string; userId: string }) => {};
}; };

View File

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

View File

@ -534,10 +534,8 @@ export const toggleArchiveRoom = (roomId: string, t: SubscriptionType, archive:
return sdk.post(`${roomTypeToApiType(type)}.unarchive`, { roomId }); return sdk.post(`${roomTypeToApiType(type)}.unarchive`, { roomId });
}; };
export const hideRoom = (roomId: string, t: RoomTypes): any => export const hideRoom = (roomId: string, t: RoomTypes) =>
// RC 0.48.0 // RC 0.48.0
// TODO: missing definitions from server
// @ts-ignore
sdk.post(`${roomTypeToApiType(t)}.close`, { roomId }); sdk.post(`${roomTypeToApiType(t)}.close`, { roomId });
export const saveRoomSettings = ( export const saveRoomSettings = (