Built motion from commit (unavailable).|2.6.0
[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 _0xb575=['idField','nameField','../../client','getSugarcrmAccounts','GetSugarcrmAccount','name','username','password','remoteUri','serverUrl','SugarcrmConfiguration','Configurations','SugarcrmField','content','variableName','Variable','Descriptions','key','keyType','type'];(function(_0x59ff93,_0x380edf){var _0x41315e=function(_0x4da528){while(--_0x4da528){_0x59ff93['push'](_0x59ff93['shift']());}};_0x41315e(++_0x380edf);}(_0xb575,0xb6));var _0x5b57=function(_0x1c1666,_0x3b8b7d){_0x1c1666=_0x1c1666-0x0;var _0x1799e5=_0xb575[_0x1c1666];return _0x1799e5;};'use strict';var client=require(_0x5b57('0x0'));exports[_0x5b57('0x1')]=function(){return function(_0x245661){return client['Request'](_0x5b57('0x2'),{'options':{'raw':![],'attributes':['id',_0x5b57('0x3'),_0x5b57('0x4'),_0x5b57('0x5'),_0x5b57('0x6'),_0x5b57('0x7')],'include':[{'model':_0x5b57('0x8'),'as':_0x5b57('0x9'),'attributes':['id',_0x5b57('0x3')],'include':[{'model':_0x5b57('0xa'),'as':'Subjects','attributes':['id','type',_0x5b57('0xb'),_0x5b57('0xc')],'include':[{'model':_0x5b57('0xd'),'as':_0x5b57('0xd'),'attributes':['id',_0x5b57('0x3')]}]},{'model':_0x5b57('0xa'),'as':_0x5b57('0xe'),'attributes':['id','type','content',_0x5b57('0xf'),_0x5b57('0x10'),'keyContent',_0x5b57('0xc')],'include':[{'model':'Variable','as':_0x5b57('0xd'),'attributes':['id',_0x5b57('0x3')]}]},{'model':_0x5b57('0xa'),'as':'Fields','attributes':['id',_0x5b57('0x11'),_0x5b57('0xb'),_0x5b57('0x12'),_0x5b57('0x13'),'customField',_0x5b57('0xc')],'include':[{'model':'Variable','as':'Variable','attributes':['id',_0x5b57('0x3')]}]}]}]},'log':_0x5b57('0x2')});};};