7df0aa6defdabde7502bd3abd7563344f577caef
[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 _0x95fa=['SugarcrmField','Descriptions','keyType','keyContent','content','customField','GetSugarcrmAccount','../../client','getSugarcrmAccounts','Request','name','password','remoteUri','serverUrl','SugarcrmConfiguration','Configurations','type','variableName','Variable'];(function(_0x40769f,_0x4d516d){var _0x469d2b=function(_0x26cbf5){while(--_0x26cbf5){_0x40769f['push'](_0x40769f['shift']());}};_0x469d2b(++_0x4d516d);}(_0x95fa,0x196));var _0xa95f=function(_0x5329aa,_0x17a3cc){_0x5329aa=_0x5329aa-0x0;var _0x5266fa=_0x95fa[_0x5329aa];return _0x5266fa;};'use strict';var client=require(_0xa95f('0x0'));exports[_0xa95f('0x1')]=function(){return function(_0x4ea0ca){return client[_0xa95f('0x2')]('GetSugarcrmAccount',{'options':{'raw':![],'attributes':['id',_0xa95f('0x3'),'username',_0xa95f('0x4'),_0xa95f('0x5'),_0xa95f('0x6')],'include':[{'model':_0xa95f('0x7'),'as':_0xa95f('0x8'),'attributes':['id','name'],'include':[{'model':'SugarcrmField','as':'Subjects','attributes':['id',_0xa95f('0x9'),'content',_0xa95f('0xa')],'include':[{'model':_0xa95f('0xb'),'as':_0xa95f('0xb'),'attributes':['id',_0xa95f('0x3')]}]},{'model':_0xa95f('0xc'),'as':_0xa95f('0xd'),'attributes':['id',_0xa95f('0x9'),'content','key',_0xa95f('0xe'),_0xa95f('0xf'),'variableName'],'include':[{'model':_0xa95f('0xb'),'as':_0xa95f('0xb'),'attributes':['id',_0xa95f('0x3')]}]},{'model':_0xa95f('0xc'),'as':'Fields','attributes':['id',_0xa95f('0x9'),_0xa95f('0x10'),'idField','nameField',_0xa95f('0x11'),_0xa95f('0xa')],'include':[{'model':_0xa95f('0xb'),'as':_0xa95f('0xb'),'attributes':['id',_0xa95f('0x3')]}]}]}]},'log':_0xa95f('0x12')});};};