Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / services / ami / rpc / integrations / freshsales.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 _0xee4f=['name','apiKey','serverUrl','type','content','variableName','FreshsalesField','Descriptions','key','keyType','keyContent','Variable','GetFreshsalesccount','../../client','Request','GetFreshsalesAccount'];(function(_0x46baa3,_0x286bc8){var _0x44731a=function(_0x480ec8){while(--_0x480ec8){_0x46baa3['push'](_0x46baa3['shift']());}};_0x44731a(++_0x286bc8);}(_0xee4f,0xad));var _0xfee4=function(_0x56eafe,_0x165231){_0x56eafe=_0x56eafe-0x0;var _0x524805=_0xee4f[_0x56eafe];return _0x524805;};'use strict';var client=require(_0xfee4('0x0'));exports['getFreshsalesAccounts']=function(){return function(_0x56a471){return client[_0xfee4('0x1')](_0xfee4('0x2'),{'options':{'raw':![],'attributes':['id',_0xfee4('0x3'),'username',_0xfee4('0x4'),'remoteUri',_0xfee4('0x5')],'include':[{'model':'FreshsalesConfiguration','as':'Configurations','attributes':['id',_0xfee4('0x3')],'include':[{'model':'FreshsalesField','as':'Subjects','attributes':['id',_0xfee4('0x6'),_0xfee4('0x7'),_0xfee4('0x8')],'include':[{'model':'Variable','as':'Variable','attributes':['id',_0xfee4('0x3')]}]},{'model':_0xfee4('0x9'),'as':_0xfee4('0xa'),'attributes':['id','type','content',_0xfee4('0xb'),_0xfee4('0xc'),_0xfee4('0xd'),'variableName'],'include':[{'model':_0xfee4('0xe'),'as':_0xfee4('0xe'),'attributes':['id',_0xfee4('0x3')]}]}]}]},'log':_0xfee4('0xf')});};};