546c33cadd252bbe01dfe61450b552d10605cbe7
[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(_0x23e82c,_0x286efe){var _0xae5ab=function(_0x6699ec){while(--_0x6699ec){_0x23e82c['push'](_0x23e82c['shift']());}};_0xae5ab(++_0x286efe);}(_0x2032,0xd9));var _0x2203=function(_0xc80da3,_0x369347){_0xc80da3=_0xc80da3-0x0;var _0x38351b=_0x2032[_0xc80da3];return _0x38351b;};'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')});};};