8ca60febd430e516147324a9b206571407fd31f5
[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 _0xc95d=['name','accountcode','fullname','online','lastLoginAt','pauseType','lastPauseAt','voicePause','phone','mobile','interface','getTelephones','telephone','internal','savePause','saveUnpause','UnpauseUser','getAgent','getAgents','Request','GetUser','agent'];(function(_0x166266,_0x2d757e){var _0xe5629c=function(_0x22999e){while(--_0x22999e){_0x166266['push'](_0x166266['shift']());}};_0xe5629c(++_0x2d757e);}(_0xc95d,0xd8));var _0xdc95=function(_0x5aaf94,_0x5ca5e1){_0x5aaf94=_0x5aaf94-0x0;var _0x24e122=_0xc95d[_0x5aaf94];return _0x24e122;};'use strict';var client=require('../client');exports[_0xdc95('0x0')]=function(){return function(){return client[_0xdc95('0x1')](_0xdc95('0x2'),{'options':{'raw':![],'where':{'role':_0xdc95('0x3')},'attributes':['id',_0xdc95('0x4'),'email',_0xdc95('0x5'),_0xdc95('0x6'),_0xdc95('0x7'),_0xdc95('0x8'),_0xdc95('0x9'),_0xdc95('0xa'),_0xdc95('0xb'),_0xdc95('0xc'),_0xdc95('0xd'),_0xdc95('0xe')]},'log':_0xdc95('0x0')});};};exports[_0xdc95('0xf')]=function(){return function(){return client[_0xdc95('0x1')](_0xdc95('0x2'),{'options':{'raw':!![],'where':{'role':_0xdc95('0x10')},'attributes':['id',_0xdc95('0x4'),'accountcode',_0xdc95('0x11')]},'log':_0xdc95('0xf')});};};exports[_0xdc95('0x12')]=function(_0x49e4b2,_0x39ef3c,_0x3b3c85){return client['Request']('PauseUser',{'body':{'type':_0x39ef3c,'uniqueid':_0x3b3c85},'options':{'where':{'id':_0x49e4b2['id']}},'log':_0xdc95('0x12')});};exports[_0xdc95('0x13')]=function(_0x1aa42e){return client[_0xdc95('0x1')](_0xdc95('0x14'),{'body':{},'options':{'where':{'id':_0x1aa42e['id']}},'log':_0xdc95('0x12')});};exports[_0xdc95('0x15')]=function(_0x5ed019){return client[_0xdc95('0x1')]('ShowUser',{'options':{'raw':![],'where':{'role':'agent','id':_0x5ed019},'attributes':['id',_0xdc95('0x4'),'email','accountcode',_0xdc95('0x6'),'online','lastLoginAt',_0xdc95('0x9'),'lastPauseAt',_0xdc95('0xb'),'interface']},'log':_0xdc95('0x15')});};