From 72088762a3b6ecf451af0356ba0a8a32f6076077 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Mon, 28 Feb 2022 12:31:58 -0300 Subject: [PATCH] Chore: Migrate REST API - saveRoomSettings to Typescript --- app/lib/rocketchat/services/restApi.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/app/lib/rocketchat/services/restApi.ts b/app/lib/rocketchat/services/restApi.ts index b24129af5f..7e0a8cec22 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -594,7 +594,22 @@ export const hideRoom = (roomId: string, t: RoomTypes): any => // @ts-ignore sdk.post(`${roomTypeToApiType(t)}.close`, { roomId }); -export const saveRoomSettings = (rid: string, params: any) => +export const saveRoomSettings = ( + rid: string, + params: { + roomName?: string; + roomAvatar?: string; + roomDescription?: string; + roomTopic?: string; + roomAnnouncement?: string; + roomType?: SubscriptionType; + readOnly?: boolean; + reactWhenReadOnly?: boolean; + systemMessages?: string[]; + joinCode?: string; + encrypted?: boolean; + } +): Promise<{ result: boolean; rid: string }> => // RC 0.55.0 sdk.methodCallWrapper('saveRoomSettings', rid, params);