Chore: Migrate REST API - deleteRoom to Typescript (#3834)
This commit is contained in:
parent
892e919768
commit
256bf0eaee
|
@ -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 }) => {};
|
||||||
};
|
};
|
||||||
|
|
|
@ -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 }) => {};
|
||||||
};
|
};
|
||||||
|
|
|
@ -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 }) => {};
|
||||||
};
|
};
|
||||||
|
|
|
@ -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) => {
|
||||||
|
|
Loading…
Reference in New Issue