9d92f3d0472866ff8e004d90036bb1f6942f2cc7
[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 _0x36d6=['ShowUser','lastPauseAt','../client','getAgents','Request','GetUser','agent','name','email','fullname','online','lastLoginAt','voicePause','phone','mobile','interface','getTelephones','savePause','PauseUser','saveUnpause','UnpauseUser','getAgent'];(function(_0x5577ec,_0x58dcf5){var _0x47e778=function(_0xbed250){while(--_0xbed250){_0x5577ec['push'](_0x5577ec['shift']());}};_0x47e778(++_0x58dcf5);}(_0x36d6,0x1e6));var _0x636d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x36d6[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0x636d('0x0'));exports[_0x636d('0x1')]=function(){return function(){return client[_0x636d('0x2')](_0x636d('0x3'),{'options':{'raw':![],'where':{'role':_0x636d('0x4')},'attributes':['id',_0x636d('0x5'),_0x636d('0x6'),'accountcode',_0x636d('0x7'),_0x636d('0x8'),_0x636d('0x9'),'pauseType','lastPauseAt',_0x636d('0xa'),_0x636d('0xb'),_0x636d('0xc'),_0x636d('0xd')]},'log':_0x636d('0x1')});};};exports[_0x636d('0xe')]=function(){return function(){return client[_0x636d('0x2')]('GetUser',{'options':{'raw':!![],'where':{'role':'telephone'},'attributes':['id',_0x636d('0x5'),'accountcode','internal']},'log':_0x636d('0xe')});};};exports[_0x636d('0xf')]=function(_0x266ef5,_0x170faa,_0x5a621e){return client[_0x636d('0x2')](_0x636d('0x10'),{'body':{'type':_0x170faa,'uniqueid':_0x5a621e},'options':{'where':{'id':_0x266ef5['id']}},'log':_0x636d('0xf')});};exports[_0x636d('0x11')]=function(_0x4cf930){return client[_0x636d('0x2')](_0x636d('0x12'),{'body':{},'options':{'where':{'id':_0x4cf930['id']}},'log':_0x636d('0xf')});};exports[_0x636d('0x13')]=function(_0x18ba2a){return client[_0x636d('0x2')](_0x636d('0x14'),{'options':{'raw':![],'where':{'role':_0x636d('0x4'),'id':_0x18ba2a},'attributes':['id',_0x636d('0x5'),_0x636d('0x6'),'accountcode',_0x636d('0x7'),_0x636d('0x8'),'lastLoginAt','pauseType',_0x636d('0x15'),_0x636d('0xa'),_0x636d('0xd')]},'log':'getAgent'});};