81250fcf743e87d8238f64ce3cf2b06ec15da56a
[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 _0x7041=['nameField','customField','../../client','getSugarcrmAccounts','GetSugarcrmAccount','name','password','remoteUri','serverUrl','Configurations','Subjects','type','content','variableName','Variable','SugarcrmField','Descriptions','key','keyType','keyContent','idField'];(function(_0x54784f,_0x2a24d8){var _0x241e1b=function(_0x3a4cc2){while(--_0x3a4cc2){_0x54784f['push'](_0x54784f['shift']());}};_0x241e1b(++_0x2a24d8);}(_0x7041,0xfe));var _0x1704=function(_0x221bc5,_0x2aabb9){_0x221bc5=_0x221bc5-0x0;var _0x2a43c0=_0x7041[_0x221bc5];return _0x2a43c0;};'use strict';var client=require(_0x1704('0x0'));exports[_0x1704('0x1')]=function(){return function(_0x2d3727){return client['Request'](_0x1704('0x2'),{'options':{'raw':![],'attributes':['id',_0x1704('0x3'),'username',_0x1704('0x4'),_0x1704('0x5'),_0x1704('0x6')],'include':[{'model':'SugarcrmConfiguration','as':_0x1704('0x7'),'attributes':['id',_0x1704('0x3')],'include':[{'model':'SugarcrmField','as':_0x1704('0x8'),'attributes':['id',_0x1704('0x9'),_0x1704('0xa'),_0x1704('0xb')],'include':[{'model':_0x1704('0xc'),'as':'Variable','attributes':['id',_0x1704('0x3')]}]},{'model':_0x1704('0xd'),'as':_0x1704('0xe'),'attributes':['id',_0x1704('0x9'),'content',_0x1704('0xf'),_0x1704('0x10'),_0x1704('0x11'),_0x1704('0xb')],'include':[{'model':'Variable','as':'Variable','attributes':['id',_0x1704('0x3')]}]},{'model':_0x1704('0xd'),'as':'Fields','attributes':['id',_0x1704('0x9'),'content',_0x1704('0x12'),_0x1704('0x13'),_0x1704('0x14'),'variableName'],'include':[{'model':'Variable','as':'Variable','attributes':['id','name']}]}]}]},'log':_0x1704('0x2')});};};