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': {
POST: (params: { channelId: string; channelName: string }) => { team: ITeam };
};
'channels.close': {
POST: (params: { roomId: string }) => {};
};
'channels.kick': {
POST: (params: { roomId: string; userId: string }) => {};
};

View File

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

View File

@ -38,6 +38,9 @@ export type ImEndpoints = {
messages: IMessageFromServer[];
};
};
'im.close': {
POST: (params: { roomId: string }) => {};
};
'im.kick': {
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 });
};
export const hideRoom = (roomId: string, t: RoomTypes): any =>
export const hideRoom = (roomId: string, t: RoomTypes) =>
// RC 0.48.0
// TODO: missing definitions from server
// @ts-ignore
sdk.post(`${roomTypeToApiType(t)}.close`, { roomId });
export const saveRoomSettings = (