52b7ecbd77864cc9ea1063cce9c034c63229badf
[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 _0x7a54=['nameField','customField','../../client','getSugarcrmAccounts','GetSugarcrmAccount','name','password','remoteUri','serverUrl','SugarcrmConfiguration','Configurations','SugarcrmField','type','content','Variable','Descriptions','key','variableName','Fields','idField'];(function(_0x1c0c5e,_0x2dcb31){var _0x44f59d=function(_0x5ecb3f){while(--_0x5ecb3f){_0x1c0c5e['push'](_0x1c0c5e['shift']());}};_0x44f59d(++_0x2dcb31);}(_0x7a54,0x106));var _0x47a5=function(_0x388baa,_0x1c828a){_0x388baa=_0x388baa-0x0;var _0x4f5f98=_0x7a54[_0x388baa];return _0x4f5f98;};'use strict';var client=require(_0x47a5('0x0'));exports[_0x47a5('0x1')]=function(){return function(_0x44b31e){return client['Request'](_0x47a5('0x2'),{'options':{'raw':![],'attributes':['id',_0x47a5('0x3'),'username',_0x47a5('0x4'),_0x47a5('0x5'),_0x47a5('0x6')],'include':[{'model':_0x47a5('0x7'),'as':_0x47a5('0x8'),'attributes':['id','name'],'include':[{'model':_0x47a5('0x9'),'as':'Subjects','attributes':['id',_0x47a5('0xa'),_0x47a5('0xb'),'variableName'],'include':[{'model':_0x47a5('0xc'),'as':'Variable','attributes':['id','name']}]},{'model':'SugarcrmField','as':_0x47a5('0xd'),'attributes':['id',_0x47a5('0xa'),'content',_0x47a5('0xe'),'keyType','keyContent',_0x47a5('0xf')],'include':[{'model':_0x47a5('0xc'),'as':_0x47a5('0xc'),'attributes':['id',_0x47a5('0x3')]}]},{'model':_0x47a5('0x9'),'as':_0x47a5('0x10'),'attributes':['id',_0x47a5('0xa'),'content',_0x47a5('0x11'),_0x47a5('0x12'),_0x47a5('0x13'),_0x47a5('0xf')],'include':[{'model':_0x47a5('0xc'),'as':_0x47a5('0xc'),'attributes':['id',_0x47a5('0x3')]}]}]}]},'log':_0x47a5('0x2')});};};