Chore: Migrate REST API - leaveRoom to Typescript (#3833)
* chore: add rest api type * remove any
This commit is contained in:
parent
58418fc5c2
commit
892e919768
|
@ -52,4 +52,7 @@ export type ChannelsEndpoints = {
|
||||||
'channels.convertToTeam': {
|
'channels.convertToTeam': {
|
||||||
POST: (params: { channelId: string; channelName: string }) => { team: ITeam };
|
POST: (params: { channelId: string; channelName: string }) => { team: ITeam };
|
||||||
};
|
};
|
||||||
|
'channels.leave': {
|
||||||
|
POST: (params: { roomId: string }) => {};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,4 +46,7 @@ export type GroupsEndpoints = {
|
||||||
'groups.convertToTeam': {
|
'groups.convertToTeam': {
|
||||||
POST: (params: { roomId: string; roomName: string }) => { team: ITeam };
|
POST: (params: { roomId: string; roomName: string }) => { team: ITeam };
|
||||||
};
|
};
|
||||||
|
'groups.leave': {
|
||||||
|
POST: (params: { roomId: string }) => {};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,4 +38,7 @@ export type ImEndpoints = {
|
||||||
messages: IMessageFromServer[];
|
messages: IMessageFromServer[];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
'im.leave': {
|
||||||
|
POST: (params: { roomId: string }) => {};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -428,10 +428,8 @@ export const toggleBlockUser = (rid: string, blocked: string, block: boolean): P
|
||||||
return sdk.methodCallWrapper('unblockUser', { rid, blocked });
|
return sdk.methodCallWrapper('unblockUser', { rid, blocked });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const leaveRoom = (roomId: string, t: RoomTypes): any =>
|
export const leaveRoom = (roomId: string, t: RoomTypes) =>
|
||||||
// RC 0.48.0
|
// RC 0.48.0
|
||||||
// TODO: missing definitions from server
|
|
||||||
// @ts-ignore
|
|
||||||
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): any =>
|
||||||
|
|
Loading…
Reference in New Issue