b44a8a831746b4d1fc1311fdfdd9e9324e1f9037
[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 _0xdf98=['type','content','variableName','Descriptions','key','keyType','keyContent','Variable','GetFreshsalesccount','../../client','name','username','apiKey','remoteUri','serverUrl','FreshsalesConfiguration','Configurations','FreshsalesField'];(function(_0x9cd4c3,_0x1c9b2c){var _0x4c9025=function(_0x25b3c6){while(--_0x25b3c6){_0x9cd4c3['push'](_0x9cd4c3['shift']());}};_0x4c9025(++_0x1c9b2c);}(_0xdf98,0xcf));var _0x8df9=function(_0x1ffff7,_0x2f9ff6){_0x1ffff7=_0x1ffff7-0x0;var _0x49d017=_0xdf98[_0x1ffff7];return _0x49d017;};'use strict';var client=require(_0x8df9('0x0'));exports['getFreshsalesAccounts']=function(){return function(_0x1f9abd){return client['Request']('GetFreshsalesAccount',{'options':{'raw':![],'attributes':['id',_0x8df9('0x1'),_0x8df9('0x2'),_0x8df9('0x3'),_0x8df9('0x4'),_0x8df9('0x5')],'include':[{'model':_0x8df9('0x6'),'as':_0x8df9('0x7'),'attributes':['id',_0x8df9('0x1')],'include':[{'model':_0x8df9('0x8'),'as':'Subjects','attributes':['id',_0x8df9('0x9'),_0x8df9('0xa'),_0x8df9('0xb')],'include':[{'model':'Variable','as':'Variable','attributes':['id',_0x8df9('0x1')]}]},{'model':'FreshsalesField','as':_0x8df9('0xc'),'attributes':['id',_0x8df9('0x9'),_0x8df9('0xa'),_0x8df9('0xd'),_0x8df9('0xe'),_0x8df9('0xf'),_0x8df9('0xb')],'include':[{'model':_0x8df9('0x10'),'as':'Variable','attributes':['id',_0x8df9('0x1')]}]}]}]},'log':_0x8df9('0x11')});};};