Built motion from commit (unavailable).|2.5.26
[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 _0x823c=['Fields','idField','nameField','../../client','Request','GetSugarcrmAccount','name','username','password','serverUrl','SugarcrmConfiguration','Configurations','SugarcrmField','type','content','Variable','Descriptions','keyType','keyContent','variableName'];(function(_0x5e3cbe,_0x510f74){var _0x334cc1=function(_0x2ebee1){while(--_0x2ebee1){_0x5e3cbe['push'](_0x5e3cbe['shift']());}};_0x334cc1(++_0x510f74);}(_0x823c,0x143));var _0xc823=function(_0x1664ae,_0x261408){_0x1664ae=_0x1664ae-0x0;var _0x54e35e=_0x823c[_0x1664ae];return _0x54e35e;};'use strict';var client=require(_0xc823('0x0'));exports['getSugarcrmAccounts']=function(){return function(_0x30a06f){return client[_0xc823('0x1')](_0xc823('0x2'),{'options':{'raw':![],'attributes':['id',_0xc823('0x3'),_0xc823('0x4'),_0xc823('0x5'),'remoteUri',_0xc823('0x6')],'include':[{'model':_0xc823('0x7'),'as':_0xc823('0x8'),'attributes':['id',_0xc823('0x3')],'include':[{'model':_0xc823('0x9'),'as':'Subjects','attributes':['id',_0xc823('0xa'),_0xc823('0xb'),'variableName'],'include':[{'model':'Variable','as':_0xc823('0xc'),'attributes':['id',_0xc823('0x3')]}]},{'model':'SugarcrmField','as':_0xc823('0xd'),'attributes':['id',_0xc823('0xa'),'content','key',_0xc823('0xe'),_0xc823('0xf'),_0xc823('0x10')],'include':[{'model':_0xc823('0xc'),'as':_0xc823('0xc'),'attributes':['id','name']}]},{'model':_0xc823('0x9'),'as':_0xc823('0x11'),'attributes':['id',_0xc823('0xa'),_0xc823('0xb'),_0xc823('0x12'),_0xc823('0x13'),'customField',_0xc823('0x10')],'include':[{'model':_0xc823('0xc'),'as':_0xc823('0xc'),'attributes':['id',_0xc823('0x3')]}]}]}]},'log':'GetSugarcrmAccount'});};};