Chore: Migrate REST API - getRoutingConfig to Typescript (#3794)

* Chore: Migrate REST API - getRoutingConfig to Typescript

* minor tweak
This commit is contained in:
Reinaldo Neto 2022-03-02 16:32:11 -03:00 committed by GitHub
parent 1c5f8b1731
commit 0521c291f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -428,7 +428,15 @@ export const usersAutoComplete = (selector: any) =>
// RC 2.4.0
sdk.get('users.autocomplete', { selector });
export const getRoutingConfig = () =>
export const getRoutingConfig = (): Promise<{
previewRoom: boolean;
showConnecting: boolean;
showQueue: boolean;
showQueueLink: boolean;
returnQueue: boolean;
enableTriggerAction: boolean;
autoAssignAgent: boolean;
}> =>
// RC 2.0.0
sdk.methodCallWrapper('livechat:getRoutingConfig');

View File

@ -347,7 +347,7 @@ class RoomActionsView extends React.Component<IRoomActionsViewProps, IRoomAction
const { returnQueue } = await RocketChat.getRoutingConfig();
return returnQueue;
} catch {
// do nothing
return false;
}
};