eb99813fc45f87e290025fc0d4d1938101f15aad
[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 _0x6479=['phone','interface','getTelephones','Request','internal','savePause','PauseUser','saveUnpause','getAgent','email','../client','getAgents','GetUser','agent','name','accountcode','fullname','online','lastLoginAt','pauseType','lastPauseAt','voicePause'];(function(_0x5a2682,_0x4215e2){var _0x392e94=function(_0x328625){while(--_0x328625){_0x5a2682['push'](_0x5a2682['shift']());}};_0x392e94(++_0x4215e2);}(_0x6479,0xd0));var _0x9647=function(_0x2dea24,_0x2fc021){_0x2dea24=_0x2dea24-0x0;var _0x309d58=_0x6479[_0x2dea24];return _0x309d58;};'use strict';var client=require(_0x9647('0x0'));exports[_0x9647('0x1')]=function(){return function(){return client['Request'](_0x9647('0x2'),{'options':{'raw':![],'where':{'role':_0x9647('0x3')},'attributes':['id',_0x9647('0x4'),'email',_0x9647('0x5'),_0x9647('0x6'),_0x9647('0x7'),_0x9647('0x8'),_0x9647('0x9'),_0x9647('0xa'),_0x9647('0xb'),_0x9647('0xc'),'mobile',_0x9647('0xd')]},'log':_0x9647('0x1')});};};exports[_0x9647('0xe')]=function(){return function(){return client[_0x9647('0xf')]('GetUser',{'options':{'raw':!![],'where':{'role':'telephone'},'attributes':['id',_0x9647('0x4'),'accountcode',_0x9647('0x10')]},'log':_0x9647('0xe')});};};exports[_0x9647('0x11')]=function(_0x1231b4,_0x225cff,_0x1bfaaa){return client[_0x9647('0xf')](_0x9647('0x12'),{'body':{'type':_0x225cff,'uniqueid':_0x1bfaaa},'options':{'where':{'id':_0x1231b4['id']}},'log':'savePause'});};exports[_0x9647('0x13')]=function(_0x2aa9ef){return client[_0x9647('0xf')]('UnpauseUser',{'body':{},'options':{'where':{'id':_0x2aa9ef['id']}},'log':_0x9647('0x11')});};exports[_0x9647('0x14')]=function(_0x3cf7b8){return client[_0x9647('0xf')]('ShowUser',{'options':{'raw':![],'where':{'role':'agent','id':_0x3cf7b8},'attributes':['id',_0x9647('0x4'),_0x9647('0x15'),_0x9647('0x5'),_0x9647('0x6'),_0x9647('0x7'),'lastLoginAt',_0x9647('0x9'),'lastPauseAt',_0x9647('0xb'),_0x9647('0xd')]},'log':_0x9647('0x14')});};