Chore: Migrate REST API - hideRoom to Typescript (#3832)
This commit is contained in:
parent
82439159a5
commit
1ef9f57f3d
|
@ -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 }) => {};
|
||||
};
|
||||
|
|
|
@ -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 }) => {};
|
||||
};
|
||||
|
|
|
@ -38,6 +38,9 @@ export type ImEndpoints = {
|
|||
messages: IMessageFromServer[];
|
||||
};
|
||||
};
|
||||
'im.close': {
|
||||
POST: (params: { roomId: string }) => {};
|
||||
};
|
||||
'im.kick': {
|
||||
POST: (params: { roomId: string; userId: string }) => {};
|
||||
};
|
||||
|
|
|
@ -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 = (
|
||||
|
|
Loading…
Reference in New Issue