e0a1f1db9484a2193f4894f10d5658070f9586c7
[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 _0x2b84=['remoteUri','serverUrl','FreshsalesConfiguration','Configurations','FreshsalesField','Subjects','content','Variable','Descriptions','type','key','keyContent','variableName','GetFreshsalesccount','../../client','Request','GetFreshsalesAccount','name','apiKey'];(function(_0x4da8d6,_0x269dd3){var _0x3b9978=function(_0x11217e){while(--_0x11217e){_0x4da8d6['push'](_0x4da8d6['shift']());}};_0x3b9978(++_0x269dd3);}(_0x2b84,0x105));var _0x42b8=function(_0x4154a6,_0x2c0b8e){_0x4154a6=_0x4154a6-0x0;var _0x3b2786=_0x2b84[_0x4154a6];return _0x3b2786;};'use strict';var client=require(_0x42b8('0x0'));exports['getFreshsalesAccounts']=function(){return function(_0x17ebee){return client[_0x42b8('0x1')](_0x42b8('0x2'),{'options':{'raw':![],'attributes':['id',_0x42b8('0x3'),'username',_0x42b8('0x4'),_0x42b8('0x5'),_0x42b8('0x6')],'include':[{'model':_0x42b8('0x7'),'as':_0x42b8('0x8'),'attributes':['id',_0x42b8('0x3')],'include':[{'model':_0x42b8('0x9'),'as':_0x42b8('0xa'),'attributes':['id','type',_0x42b8('0xb'),'variableName'],'include':[{'model':_0x42b8('0xc'),'as':'Variable','attributes':['id','name']}]},{'model':_0x42b8('0x9'),'as':_0x42b8('0xd'),'attributes':['id',_0x42b8('0xe'),_0x42b8('0xb'),_0x42b8('0xf'),'keyType',_0x42b8('0x10'),_0x42b8('0x11')],'include':[{'model':_0x42b8('0xc'),'as':'Variable','attributes':['id',_0x42b8('0x3')]}]}]}]},'log':_0x42b8('0x12')});};};