bf2bc35ef475a98d7720700fc6c5a5b381294d8a
[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 _0xa84c=['SugarcrmConfiguration','name','SugarcrmField','variableName','Variable','Descriptions','content','key','keyType','Fields','idField','nameField','../../client','Request','GetSugarcrmAccount','username','remoteUri'];(function(_0x434929,_0x72a266){var _0x48641e=function(_0x3e87e0){while(--_0x3e87e0){_0x434929['push'](_0x434929['shift']());}};_0x48641e(++_0x72a266);}(_0xa84c,0x1e8));var _0xca84=function(_0x19eb1c,_0xd78b93){_0x19eb1c=_0x19eb1c-0x0;var _0x107257=_0xa84c[_0x19eb1c];return _0x107257;};'use strict';var client=require(_0xca84('0x0'));exports['getSugarcrmAccounts']=function(){return function(_0x57cb5a){return client[_0xca84('0x1')](_0xca84('0x2'),{'options':{'raw':![],'attributes':['id','name',_0xca84('0x3'),'password',_0xca84('0x4'),'serverUrl'],'include':[{'model':_0xca84('0x5'),'as':'Configurations','attributes':['id',_0xca84('0x6')],'include':[{'model':_0xca84('0x7'),'as':'Subjects','attributes':['id','type','content',_0xca84('0x8')],'include':[{'model':_0xca84('0x9'),'as':'Variable','attributes':['id',_0xca84('0x6')]}]},{'model':_0xca84('0x7'),'as':_0xca84('0xa'),'attributes':['id','type',_0xca84('0xb'),_0xca84('0xc'),_0xca84('0xd'),'keyContent',_0xca84('0x8')],'include':[{'model':_0xca84('0x9'),'as':_0xca84('0x9'),'attributes':['id','name']}]},{'model':'SugarcrmField','as':_0xca84('0xe'),'attributes':['id','type','content',_0xca84('0xf'),_0xca84('0x10'),'customField','variableName'],'include':[{'model':_0xca84('0x9'),'as':_0xca84('0x9'),'attributes':['id',_0xca84('0x6')]}]}]}]},'log':_0xca84('0x2')});};};