Built motion from commit (unavailable).|2.3.4
[motion2.git] / server / services / ami / rpc / user.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x99e6=['../client','Request','GetUser','email','accountcode','lastLoginAt','pauseType','phone','mobile','interface','getAgents','telephone','name','savePause','getAgent','ShowUser','agent','online','lastPauseAt','voicePause'];(function(_0x254a06,_0x1986d2){var _0x194c99=function(_0x24c1f9){while(--_0x24c1f9){_0x254a06['push'](_0x254a06['shift']());}};_0x194c99(++_0x1986d2);}(_0x99e6,0x1b8));var _0x699e=function(_0x934425,_0x5af72f){_0x934425=_0x934425-0x0;var _0x31d596=_0x99e6[_0x934425];return _0x31d596;};'use strict';var client=require(_0x699e('0x0'));exports['getAgents']=function(){return function(){return client[_0x699e('0x1')](_0x699e('0x2'),{'options':{'raw':![],'where':{'role':'agent'},'attributes':['id','name',_0x699e('0x3'),_0x699e('0x4'),'fullname','online',_0x699e('0x5'),_0x699e('0x6'),'lastPauseAt','voicePause',_0x699e('0x7'),_0x699e('0x8'),_0x699e('0x9')]},'log':_0x699e('0xa')});};};exports['getTelephones']=function(){return function(){return client[_0x699e('0x1')](_0x699e('0x2'),{'options':{'raw':!![],'where':{'role':_0x699e('0xb')},'attributes':['id',_0x699e('0xc'),_0x699e('0x4'),'internal']},'log':'getTelephones'});};};exports[_0x699e('0xd')]=function(_0x2cfaa8,_0x36e719,_0x2c21c2){return client['Request']('PauseUser',{'body':{'type':_0x36e719,'uniqueid':_0x2c21c2},'options':{'where':{'id':_0x2cfaa8['id']}},'log':_0x699e('0xd')});};exports['saveUnpause']=function(_0x4ba150){return client[_0x699e('0x1')]('UnpauseUser',{'body':{},'options':{'where':{'id':_0x4ba150['id']}},'log':_0x699e('0xd')});};exports[_0x699e('0xe')]=function(_0xe79cae){return client[_0x699e('0x1')](_0x699e('0xf'),{'options':{'raw':![],'where':{'role':_0x699e('0x10'),'id':_0xe79cae},'attributes':['id',_0x699e('0xc'),_0x699e('0x3'),_0x699e('0x4'),'fullname',_0x699e('0x11'),_0x699e('0x5'),'pauseType',_0x699e('0x12'),_0x699e('0x13'),'interface']},'log':'getAgent'});};