From 16fd64b2605ba6ae3c0aadd1eb2145e209aca43a Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Thu, 3 Mar 2022 15:15:06 -0300 Subject: [PATCH] Chore: Migrate REST API - saveRoomSettings to Typescript (#3787) --- 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 e0dd6461c..e9e7937d9 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -574,7 +574,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);