11bb86b2324708ec99748230c56107fce2f02ba1
[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 _0x288b=['variableName','Variable','SugarcrmField','key','keyType','keyContent','Fields','idField','nameField','../../client','getSugarcrmAccounts','Request','GetSugarcrmAccount','username','password','remoteUri','SugarcrmConfiguration','name','type','content'];(function(_0x44d9ab,_0x76bc69){var _0x31485e=function(_0x1e44ce){while(--_0x1e44ce){_0x44d9ab['push'](_0x44d9ab['shift']());}};_0x31485e(++_0x76bc69);}(_0x288b,0xbd));var _0xb288=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x288b[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0xb288('0x0'));exports[_0xb288('0x1')]=function(){return function(_0x2b28ed){return client[_0xb288('0x2')](_0xb288('0x3'),{'options':{'raw':![],'attributes':['id','name',_0xb288('0x4'),_0xb288('0x5'),_0xb288('0x6'),'serverUrl'],'include':[{'model':_0xb288('0x7'),'as':'Configurations','attributes':['id',_0xb288('0x8')],'include':[{'model':'SugarcrmField','as':'Subjects','attributes':['id',_0xb288('0x9'),_0xb288('0xa'),_0xb288('0xb')],'include':[{'model':_0xb288('0xc'),'as':_0xb288('0xc'),'attributes':['id',_0xb288('0x8')]}]},{'model':_0xb288('0xd'),'as':'Descriptions','attributes':['id','type',_0xb288('0xa'),_0xb288('0xe'),_0xb288('0xf'),_0xb288('0x10'),_0xb288('0xb')],'include':[{'model':_0xb288('0xc'),'as':_0xb288('0xc'),'attributes':['id',_0xb288('0x8')]}]},{'model':_0xb288('0xd'),'as':_0xb288('0x11'),'attributes':['id','type',_0xb288('0xa'),_0xb288('0x12'),_0xb288('0x13'),'customField',_0xb288('0xb')],'include':[{'model':_0xb288('0xc'),'as':_0xb288('0xc'),'attributes':['id',_0xb288('0x8')]}]}]}]},'log':_0xb288('0x3')});};};