a07d45b319ed78a2c8db4e827296c04aec817145
[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 _0x1284=['lastPauseAt','voicePause','mobile','interface','getTelephones','Request','GetUser','savePause','saveUnpause','UnpauseUser','getAgent','ShowUser','getAgents','agent','name','email','accountcode','fullname','online','lastLoginAt','pauseType'];(function(_0x22b39b,_0x2b7d63){var _0x280e1d=function(_0xc74635){while(--_0xc74635){_0x22b39b['push'](_0x22b39b['shift']());}};_0x280e1d(++_0x2b7d63);}(_0x1284,0x147));var _0x4128=function(_0x15ea09,_0x2f30ab){_0x15ea09=_0x15ea09-0x0;var _0x3e9c78=_0x1284[_0x15ea09];return _0x3e9c78;};'use strict';var client=require('../client');exports[_0x4128('0x0')]=function(){return function(){return client['Request']('GetUser',{'options':{'raw':![],'where':{'role':_0x4128('0x1')},'attributes':['id',_0x4128('0x2'),_0x4128('0x3'),_0x4128('0x4'),_0x4128('0x5'),_0x4128('0x6'),_0x4128('0x7'),_0x4128('0x8'),_0x4128('0x9'),_0x4128('0xa'),'phone',_0x4128('0xb'),_0x4128('0xc')]},'log':_0x4128('0x0')});};};exports[_0x4128('0xd')]=function(){return function(){return client[_0x4128('0xe')](_0x4128('0xf'),{'options':{'raw':!![],'where':{'role':'telephone'},'attributes':['id',_0x4128('0x2'),_0x4128('0x4'),'internal']},'log':_0x4128('0xd')});};};exports[_0x4128('0x10')]=function(_0x118dfe,_0x1372a9,_0x2b1ce3){return client[_0x4128('0xe')]('PauseUser',{'body':{'type':_0x1372a9,'uniqueid':_0x2b1ce3},'options':{'where':{'id':_0x118dfe['id']}},'log':_0x4128('0x10')});};exports[_0x4128('0x11')]=function(_0x4793d6){return client['Request'](_0x4128('0x12'),{'body':{},'options':{'where':{'id':_0x4793d6['id']}},'log':_0x4128('0x10')});};exports[_0x4128('0x13')]=function(_0x4ab873){return client[_0x4128('0xe')](_0x4128('0x14'),{'options':{'raw':![],'where':{'role':_0x4128('0x1'),'id':_0x4ab873},'attributes':['id',_0x4128('0x2'),_0x4128('0x3'),_0x4128('0x4'),_0x4128('0x5'),'online',_0x4128('0x7'),'pauseType',_0x4128('0x9'),'voicePause',_0x4128('0xc')]},'log':_0x4128('0x13')});};