142966ce252fb8c5eb01178b7aa8ea5f07f2100b
[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 _0x465b=['variableName','Variable','keyType','keyContent','idField','nameField','../../client','Request','GetSugarcrmAccount','name','username','password','remoteUri','serverUrl','SugarcrmConfiguration','Configurations','SugarcrmField','Subjects','type','content'];(function(_0x12d573,_0x20ae28){var _0x5c7071=function(_0x16ea02){while(--_0x16ea02){_0x12d573['push'](_0x12d573['shift']());}};_0x5c7071(++_0x20ae28);}(_0x465b,0x146));var _0xb465=function(_0x55852e,_0x432ea1){_0x55852e=_0x55852e-0x0;var _0x1ff2fc=_0x465b[_0x55852e];return _0x1ff2fc;};'use strict';var client=require(_0xb465('0x0'));exports['getSugarcrmAccounts']=function(){return function(_0x557b20){return client[_0xb465('0x1')](_0xb465('0x2'),{'options':{'raw':![],'attributes':['id',_0xb465('0x3'),_0xb465('0x4'),_0xb465('0x5'),_0xb465('0x6'),_0xb465('0x7')],'include':[{'model':_0xb465('0x8'),'as':_0xb465('0x9'),'attributes':['id',_0xb465('0x3')],'include':[{'model':_0xb465('0xa'),'as':_0xb465('0xb'),'attributes':['id',_0xb465('0xc'),_0xb465('0xd'),_0xb465('0xe')],'include':[{'model':_0xb465('0xf'),'as':_0xb465('0xf'),'attributes':['id',_0xb465('0x3')]}]},{'model':'SugarcrmField','as':'Descriptions','attributes':['id',_0xb465('0xc'),_0xb465('0xd'),'key',_0xb465('0x10'),_0xb465('0x11'),'variableName'],'include':[{'model':_0xb465('0xf'),'as':'Variable','attributes':['id','name']}]},{'model':_0xb465('0xa'),'as':'Fields','attributes':['id',_0xb465('0xc'),_0xb465('0xd'),_0xb465('0x12'),_0xb465('0x13'),'customField',_0xb465('0xe')],'include':[{'model':_0xb465('0xf'),'as':_0xb465('0xf'),'attributes':['id','name']}]}]}]},'log':_0xb465('0x2')});};};