Built motion from commit (unavailable).|2.5.13
[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 _0x1361=['GetSugarcrmAccount','../../client','remoteUri','serverUrl','SugarcrmConfiguration','Configurations','name','type','content','variableName','Variable','Descriptions','key','keyType','keyContent','SugarcrmField','Fields','idField','nameField','customField'];(function(_0x14282a,_0x61007f){var _0x298c2f=function(_0x5a997a){while(--_0x5a997a){_0x14282a['push'](_0x14282a['shift']());}};_0x298c2f(++_0x61007f);}(_0x1361,0x141));var _0x1136=function(_0x3e92c4,_0x47cc76){_0x3e92c4=_0x3e92c4-0x0;var _0x2ada99=_0x1361[_0x3e92c4];return _0x2ada99;};'use strict';var client=require(_0x1136('0x0'));exports['getSugarcrmAccounts']=function(){return function(_0x4c71f0){return client['Request']('GetSugarcrmAccount',{'options':{'raw':![],'attributes':['id','name','username','password',_0x1136('0x1'),_0x1136('0x2')],'include':[{'model':_0x1136('0x3'),'as':_0x1136('0x4'),'attributes':['id',_0x1136('0x5')],'include':[{'model':'SugarcrmField','as':'Subjects','attributes':['id',_0x1136('0x6'),_0x1136('0x7'),_0x1136('0x8')],'include':[{'model':_0x1136('0x9'),'as':'Variable','attributes':['id',_0x1136('0x5')]}]},{'model':'SugarcrmField','as':_0x1136('0xa'),'attributes':['id',_0x1136('0x6'),_0x1136('0x7'),_0x1136('0xb'),_0x1136('0xc'),_0x1136('0xd'),_0x1136('0x8')],'include':[{'model':_0x1136('0x9'),'as':_0x1136('0x9'),'attributes':['id',_0x1136('0x5')]}]},{'model':_0x1136('0xe'),'as':_0x1136('0xf'),'attributes':['id',_0x1136('0x6'),_0x1136('0x7'),_0x1136('0x10'),_0x1136('0x11'),_0x1136('0x12'),_0x1136('0x8')],'include':[{'model':_0x1136('0x9'),'as':_0x1136('0x9'),'attributes':['id',_0x1136('0x5')]}]}]}]},'log':_0x1136('0x13')});};};