9b894e78d8dae22719a4ae473173e9f3e3c5c165
[motion2.git] / server / services / ami / rpc / integrations / sugarcrm.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 _0x66fa=['password','remoteUri','serverUrl','SugarcrmField','Subjects','type','content','Variable','Descriptions','keyType','keyContent','Fields','customField','../../client','getSugarcrmAccounts','Request','GetSugarcrmAccount','name','username'];(function(_0x284d60,_0x4bfd61){var _0x4f4ec7=function(_0x457edc){while(--_0x457edc){_0x284d60['push'](_0x284d60['shift']());}};_0x4f4ec7(++_0x4bfd61);}(_0x66fa,0x117));var _0xa66f=function(_0x47db74,_0x1cfdf6){_0x47db74=_0x47db74-0x0;var _0x4e1f2d=_0x66fa[_0x47db74];return _0x4e1f2d;};'use strict';var client=require(_0xa66f('0x0'));exports[_0xa66f('0x1')]=function(){return function(_0x52947a){return client[_0xa66f('0x2')](_0xa66f('0x3'),{'options':{'raw':![],'attributes':['id',_0xa66f('0x4'),_0xa66f('0x5'),_0xa66f('0x6'),_0xa66f('0x7'),_0xa66f('0x8')],'include':[{'model':'SugarcrmConfiguration','as':'Configurations','attributes':['id',_0xa66f('0x4')],'include':[{'model':_0xa66f('0x9'),'as':_0xa66f('0xa'),'attributes':['id',_0xa66f('0xb'),_0xa66f('0xc'),'variableName'],'include':[{'model':_0xa66f('0xd'),'as':'Variable','attributes':['id',_0xa66f('0x4')]}]},{'model':'SugarcrmField','as':_0xa66f('0xe'),'attributes':['id','type','content','key',_0xa66f('0xf'),_0xa66f('0x10'),'variableName'],'include':[{'model':_0xa66f('0xd'),'as':'Variable','attributes':['id',_0xa66f('0x4')]}]},{'model':'SugarcrmField','as':_0xa66f('0x11'),'attributes':['id',_0xa66f('0xb'),_0xa66f('0xc'),'idField','nameField',_0xa66f('0x12'),'variableName'],'include':[{'model':'Variable','as':'Variable','attributes':['id',_0xa66f('0x4')]}]}]}]},'log':_0xa66f('0x3')});};};