5a24d83533afaa6d471f40da603bde1e5b71a27d
[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 _0x59df=['idField','nameField','customField','../../client','getSugarcrmAccounts','Request','GetSugarcrmAccount','name','username','password','serverUrl','SugarcrmConfiguration','Configurations','SugarcrmField','content','variableName','Variable','type','key','keyType','keyContent'];(function(_0x489936,_0x27f1f9){var _0x122c3f=function(_0x36443e){while(--_0x36443e){_0x489936['push'](_0x489936['shift']());}};_0x122c3f(++_0x27f1f9);}(_0x59df,0x81));var _0xf59d=function(_0xba484c,_0x3b0c2f){_0xba484c=_0xba484c-0x0;var _0x1502d6=_0x59df[_0xba484c];return _0x1502d6;};'use strict';var client=require(_0xf59d('0x0'));exports[_0xf59d('0x1')]=function(){return function(_0x2d5f2d){return client[_0xf59d('0x2')](_0xf59d('0x3'),{'options':{'raw':![],'attributes':['id',_0xf59d('0x4'),_0xf59d('0x5'),_0xf59d('0x6'),'remoteUri',_0xf59d('0x7')],'include':[{'model':_0xf59d('0x8'),'as':_0xf59d('0x9'),'attributes':['id',_0xf59d('0x4')],'include':[{'model':_0xf59d('0xa'),'as':'Subjects','attributes':['id','type',_0xf59d('0xb'),_0xf59d('0xc')],'include':[{'model':_0xf59d('0xd'),'as':_0xf59d('0xd'),'attributes':['id',_0xf59d('0x4')]}]},{'model':_0xf59d('0xa'),'as':'Descriptions','attributes':['id',_0xf59d('0xe'),_0xf59d('0xb'),_0xf59d('0xf'),_0xf59d('0x10'),_0xf59d('0x11'),'variableName'],'include':[{'model':'Variable','as':_0xf59d('0xd'),'attributes':['id',_0xf59d('0x4')]}]},{'model':_0xf59d('0xa'),'as':'Fields','attributes':['id',_0xf59d('0xe'),_0xf59d('0xb'),_0xf59d('0x12'),_0xf59d('0x13'),_0xf59d('0x14'),_0xf59d('0xc')],'include':[{'model':'Variable','as':_0xf59d('0xd'),'attributes':['id','name']}]}]}]},'log':_0xf59d('0x3')});};};