9bd88e1144c651550808bc5039150cdb392d5b90
[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 _0x21a1=['name','username','serverUrl','Configurations','SugarcrmField','Subjects','type','content','variableName','Variable','Descriptions','key','keyContent','Fields','idField','nameField','GetSugarcrmAccount','../../client','getSugarcrmAccounts','Request'];(function(_0x209941,_0x5c9988){var _0x1e8729=function(_0x51a9b8){while(--_0x51a9b8){_0x209941['push'](_0x209941['shift']());}};_0x1e8729(++_0x5c9988);}(_0x21a1,0x1f1));var _0x121a=function(_0x42dc05,_0x3609fa){_0x42dc05=_0x42dc05-0x0;var _0x545a4c=_0x21a1[_0x42dc05];return _0x545a4c;};'use strict';var client=require(_0x121a('0x0'));exports[_0x121a('0x1')]=function(){return function(_0x4cb98a){return client[_0x121a('0x2')]('GetSugarcrmAccount',{'options':{'raw':![],'attributes':['id',_0x121a('0x3'),_0x121a('0x4'),'password','remoteUri',_0x121a('0x5')],'include':[{'model':'SugarcrmConfiguration','as':_0x121a('0x6'),'attributes':['id','name'],'include':[{'model':_0x121a('0x7'),'as':_0x121a('0x8'),'attributes':['id',_0x121a('0x9'),_0x121a('0xa'),_0x121a('0xb')],'include':[{'model':_0x121a('0xc'),'as':_0x121a('0xc'),'attributes':['id','name']}]},{'model':_0x121a('0x7'),'as':_0x121a('0xd'),'attributes':['id','type','content',_0x121a('0xe'),'keyType',_0x121a('0xf'),_0x121a('0xb')],'include':[{'model':_0x121a('0xc'),'as':_0x121a('0xc'),'attributes':['id',_0x121a('0x3')]}]},{'model':_0x121a('0x7'),'as':_0x121a('0x10'),'attributes':['id',_0x121a('0x9'),_0x121a('0xa'),_0x121a('0x11'),_0x121a('0x12'),'customField',_0x121a('0xb')],'include':[{'model':_0x121a('0xc'),'as':_0x121a('0xc'),'attributes':['id',_0x121a('0x3')]}]}]}]},'log':_0x121a('0x13')});};};