2dc5df736093f2c7dc6ff5226e8fd6a4082dd401
[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 _0x0d05=['Request','PauseUser','UnpauseUser','ShowUser','getAgent','getAgents','GetUser','agent','name','email','fullname','online','lastLoginAt','pauseType','lastPauseAt','voicePause','interface','getTelephones','telephone','accountcode','internal','savePause'];(function(_0x281e5e,_0xf320e2){var _0x5a22d2=function(_0x405ff9){while(--_0x405ff9){_0x281e5e['push'](_0x281e5e['shift']());}};_0x5a22d2(++_0xf320e2);}(_0x0d05,0x1bd));var _0x50d0=function(_0x68a802,_0x347f7e){_0x68a802=_0x68a802-0x0;var _0x3f4e02=_0x0d05[_0x68a802];return _0x3f4e02;};'use strict';var client=require('../client');exports[_0x50d0('0x0')]=function(){return function(){return client['Request'](_0x50d0('0x1'),{'options':{'raw':![],'where':{'role':_0x50d0('0x2')},'attributes':['id',_0x50d0('0x3'),_0x50d0('0x4'),'accountcode',_0x50d0('0x5'),_0x50d0('0x6'),_0x50d0('0x7'),_0x50d0('0x8'),_0x50d0('0x9'),_0x50d0('0xa'),'phone','mobile',_0x50d0('0xb')]},'log':_0x50d0('0x0')});};};exports[_0x50d0('0xc')]=function(){return function(){return client['Request'](_0x50d0('0x1'),{'options':{'raw':!![],'where':{'role':_0x50d0('0xd')},'attributes':['id','name',_0x50d0('0xe'),_0x50d0('0xf')]},'log':_0x50d0('0xc')});};};exports[_0x50d0('0x10')]=function(_0x250ef9,_0x2a6c7a,_0x54d386){return client[_0x50d0('0x11')](_0x50d0('0x12'),{'body':{'type':_0x2a6c7a,'uniqueid':_0x54d386},'options':{'where':{'id':_0x250ef9['id']}},'log':'savePause'});};exports['saveUnpause']=function(_0x1fb693){return client[_0x50d0('0x11')](_0x50d0('0x13'),{'body':{},'options':{'where':{'id':_0x1fb693['id']}},'log':_0x50d0('0x10')});};exports['getAgent']=function(_0x4832ca){return client[_0x50d0('0x11')](_0x50d0('0x14'),{'options':{'raw':![],'where':{'role':_0x50d0('0x2'),'id':_0x4832ca},'attributes':['id',_0x50d0('0x3'),'email','accountcode',_0x50d0('0x5'),_0x50d0('0x6'),_0x50d0('0x7'),_0x50d0('0x8'),'lastPauseAt',_0x50d0('0xa'),_0x50d0('0xb')]},'log':_0x50d0('0x15')});};