f1fb252b742d81ac05df942216a72e58705d91da
[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 _0x1132=['PauseUser','saveUnpause','getAgent','ShowUser','email','lastLoginAt','../client','getAgents','agent','name','fullname','pauseType','lastPauseAt','voicePause','phone','mobile','interface','getTelephones','Request','telephone','accountcode','internal','savePause'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1132,0x15f));var _0x2113=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x1132[_0x501510];return _0x1e6ee5;};'use strict';var client=require(_0x2113('0x0'));exports[_0x2113('0x1')]=function(){return function(){return client['Request']('GetUser',{'options':{'raw':![],'where':{'role':_0x2113('0x2')},'attributes':['id',_0x2113('0x3'),'email','accountcode',_0x2113('0x4'),'online','lastLoginAt',_0x2113('0x5'),_0x2113('0x6'),_0x2113('0x7'),_0x2113('0x8'),_0x2113('0x9'),_0x2113('0xa')]},'log':'getAgents'});};};exports[_0x2113('0xb')]=function(){return function(){return client[_0x2113('0xc')]('GetUser',{'options':{'raw':!![],'where':{'role':_0x2113('0xd')},'attributes':['id','name',_0x2113('0xe'),_0x2113('0xf')]},'log':_0x2113('0xb')});};};exports[_0x2113('0x10')]=function(_0x11eabd,_0x3eb0ad,_0x544184){return client[_0x2113('0xc')](_0x2113('0x11'),{'body':{'type':_0x3eb0ad,'uniqueid':_0x544184},'options':{'where':{'id':_0x11eabd['id']}},'log':_0x2113('0x10')});};exports[_0x2113('0x12')]=function(_0x37c519){return client[_0x2113('0xc')]('UnpauseUser',{'body':{},'options':{'where':{'id':_0x37c519['id']}},'log':_0x2113('0x10')});};exports[_0x2113('0x13')]=function(_0xadb99){return client['Request'](_0x2113('0x14'),{'options':{'raw':![],'where':{'role':'agent','id':_0xadb99},'attributes':['id',_0x2113('0x3'),_0x2113('0x15'),_0x2113('0xe'),'fullname','online',_0x2113('0x16'),_0x2113('0x5'),_0x2113('0x6'),_0x2113('0x7'),_0x2113('0xa')]},'log':'getAgent'});};