07c9f862258d7126e116973827b64d73b9c21825
[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 _0x2032=['GetSugarcrmAccount','getSugarcrmAccounts','Request','name','username','remoteUri','serverUrl','SugarcrmConfiguration','Configurations','SugarcrmField','Subjects','type','content','variableName','Variable','key','keyContent','customField'];(function(_0x39365c,_0x177545){var _0x2d88c9=function(_0x420d26){while(--_0x420d26){_0x39365c['push'](_0x39365c['shift']());}};_0x2d88c9(++_0x177545);}(_0x2032,0xd9));var _0x2203=function(_0x1720df,_0x554750){_0x1720df=_0x1720df-0x0;var _0x14c070=_0x2032[_0x1720df];return _0x14c070;};'use strict';var client=require('../../client');exports[_0x2203('0x0')]=function(){return function(_0x1e103d){return client[_0x2203('0x1')]('GetSugarcrmAccount',{'options':{'raw':![],'attributes':['id',_0x2203('0x2'),_0x2203('0x3'),'password',_0x2203('0x4'),_0x2203('0x5')],'include':[{'model':_0x2203('0x6'),'as':_0x2203('0x7'),'attributes':['id',_0x2203('0x2')],'include':[{'model':_0x2203('0x8'),'as':_0x2203('0x9'),'attributes':['id',_0x2203('0xa'),_0x2203('0xb'),_0x2203('0xc')],'include':[{'model':_0x2203('0xd'),'as':'Variable','attributes':['id','name']}]},{'model':_0x2203('0x8'),'as':'Descriptions','attributes':['id',_0x2203('0xa'),_0x2203('0xb'),_0x2203('0xe'),'keyType',_0x2203('0xf'),'variableName'],'include':[{'model':_0x2203('0xd'),'as':'Variable','attributes':['id',_0x2203('0x2')]}]},{'model':_0x2203('0x8'),'as':'Fields','attributes':['id','type','content','idField','nameField',_0x2203('0x10'),'variableName'],'include':[{'model':'Variable','as':_0x2203('0xd'),'attributes':['id',_0x2203('0x2')]}]}]}]},'log':_0x2203('0x11')});};};