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': {
|
'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 }) => {};
|
||||||
};
|
};
|
||||||
|
|
|
@ -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 }) => {};
|
||||||
};
|
};
|
||||||
|
|
|
@ -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 }) => {};
|
||||||
};
|
};
|
||||||
|
|
|
@ -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 = (
|
||||||
|
|
Loading…
Reference in New Issue