69db01c916afaf7e9a3ffb163a6afa556d9ef769
[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 _0xba21=['remoteUri','SugarcrmConfiguration','Configurations','SugarcrmField','Subjects','type','content','variableName','Variable','keyType','keyContent','idField','nameField','GetSugarcrmAccount','../../client','getSugarcrmAccounts','name','username','password'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0xba21,0x93));var _0x1ba2=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0xba21[_0x59ee6f];return _0x4c0979;};'use strict';var client=require(_0x1ba2('0x0'));exports[_0x1ba2('0x1')]=function(){return function(_0x4ff4ff){return client['Request']('GetSugarcrmAccount',{'options':{'raw':![],'attributes':['id',_0x1ba2('0x2'),_0x1ba2('0x3'),_0x1ba2('0x4'),_0x1ba2('0x5'),'serverUrl'],'include':[{'model':_0x1ba2('0x6'),'as':_0x1ba2('0x7'),'attributes':['id','name'],'include':[{'model':_0x1ba2('0x8'),'as':_0x1ba2('0x9'),'attributes':['id',_0x1ba2('0xa'),_0x1ba2('0xb'),_0x1ba2('0xc')],'include':[{'model':_0x1ba2('0xd'),'as':_0x1ba2('0xd'),'attributes':['id',_0x1ba2('0x2')]}]},{'model':_0x1ba2('0x8'),'as':'Descriptions','attributes':['id',_0x1ba2('0xa'),_0x1ba2('0xb'),'key',_0x1ba2('0xe'),_0x1ba2('0xf'),'variableName'],'include':[{'model':_0x1ba2('0xd'),'as':_0x1ba2('0xd'),'attributes':['id',_0x1ba2('0x2')]}]},{'model':_0x1ba2('0x8'),'as':'Fields','attributes':['id',_0x1ba2('0xa'),'content',_0x1ba2('0x10'),_0x1ba2('0x11'),'customField','variableName'],'include':[{'model':_0x1ba2('0xd'),'as':'Variable','attributes':['id',_0x1ba2('0x2')]}]}]}]},'log':_0x1ba2('0x12')});};};