1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x4cac=['name','email','accountcode','online','lastLoginAt','lastPauseAt','voicePause','phone','mobile','interface','getTelephones','Request','telephone','savePause','PauseUser','UnpauseUser','fullname','pauseType','GetUser','agent'];(function(_0x486387,_0x3bab7d){var _0x2f495b=function(_0x5baa58){while(--_0x5baa58){_0x486387['push'](_0x486387['shift']());}};_0x2f495b(++_0x3bab7d);}(_0x4cac,0x13e));var _0xc4ca=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x4cac[_0xa464c9];return _0x3d73c4;};'use strict';var client=require('../client');exports['getAgents']=function(){return function(){return client['Request'](_0xc4ca('0x0'),{'options':{'raw':![],'where':{'role':_0xc4ca('0x1')},'attributes':['id',_0xc4ca('0x2'),_0xc4ca('0x3'),_0xc4ca('0x4'),'fullname',_0xc4ca('0x5'),_0xc4ca('0x6'),'pauseType',_0xc4ca('0x7'),_0xc4ca('0x8'),_0xc4ca('0x9'),_0xc4ca('0xa'),_0xc4ca('0xb')]},'log':'getAgents'});};};exports[_0xc4ca('0xc')]=function(){return function(){return client[_0xc4ca('0xd')](_0xc4ca('0x0'),{'options':{'raw':!![],'where':{'role':_0xc4ca('0xe')},'attributes':['id','name',_0xc4ca('0x4'),'internal']},'log':_0xc4ca('0xc')});};};exports[_0xc4ca('0xf')]=function(_0x173f72,_0x3b706c,_0x2392b1){return client[_0xc4ca('0xd')](_0xc4ca('0x10'),{'body':{'type':_0x3b706c,'uniqueid':_0x2392b1},'options':{'where':{'id':_0x173f72['id']}},'log':_0xc4ca('0xf')});};exports['saveUnpause']=function(_0x5434d9){return client[_0xc4ca('0xd')](_0xc4ca('0x11'),{'body':{},'options':{'where':{'id':_0x5434d9['id']}},'log':_0xc4ca('0xf')});};exports['getAgent']=function(_0x2ff67e){return client[_0xc4ca('0xd')]('ShowUser',{'options':{'raw':![],'where':{'role':'agent','id':_0x2ff67e},'attributes':['id',_0xc4ca('0x2'),_0xc4ca('0x3'),_0xc4ca('0x4'),_0xc4ca('0x12'),_0xc4ca('0x5'),'lastLoginAt',_0xc4ca('0x13'),_0xc4ca('0x7'),_0xc4ca('0x8'),'interface']},'log':'getAgent'});};