350ce8d1cc1b83fa9cabd6de54b197393c5bb62f
[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 _0xd19e=['Configurations','SugarcrmField','Subjects','Variable','Descriptions','type','content','key','keyType','keyContent','variableName','../../client','Request','name','username','remoteUri','SugarcrmConfiguration'];(function(_0x437813,_0x56775f){var _0x278fa7=function(_0x466d2f){while(--_0x466d2f){_0x437813['push'](_0x437813['shift']());}};_0x278fa7(++_0x56775f);}(_0xd19e,0x1e7));var _0xed19=function(_0x1e664c,_0x57f0d3){_0x1e664c=_0x1e664c-0x0;var _0x98b01e=_0xd19e[_0x1e664c];return _0x98b01e;};'use strict';var client=require(_0xed19('0x0'));exports['getSugarcrmAccounts']=function(){return function(_0x17adc9){return client[_0xed19('0x1')]('GetSugarcrmAccount',{'options':{'raw':![],'attributes':['id',_0xed19('0x2'),_0xed19('0x3'),'password',_0xed19('0x4'),'serverUrl'],'include':[{'model':_0xed19('0x5'),'as':_0xed19('0x6'),'attributes':['id',_0xed19('0x2')],'include':[{'model':_0xed19('0x7'),'as':_0xed19('0x8'),'attributes':['id','type','content','variableName'],'include':[{'model':_0xed19('0x9'),'as':_0xed19('0x9'),'attributes':['id',_0xed19('0x2')]}]},{'model':_0xed19('0x7'),'as':_0xed19('0xa'),'attributes':['id',_0xed19('0xb'),_0xed19('0xc'),_0xed19('0xd'),_0xed19('0xe'),_0xed19('0xf'),_0xed19('0x10')],'include':[{'model':_0xed19('0x9'),'as':_0xed19('0x9'),'attributes':['id','name']}]},{'model':'SugarcrmField','as':'Fields','attributes':['id',_0xed19('0xb'),_0xed19('0xc'),'idField','nameField','customField',_0xed19('0x10')],'include':[{'model':'Variable','as':_0xed19('0x9'),'attributes':['id',_0xed19('0x2')]}]}]}]},'log':'GetSugarcrmAccount'});};};