0f0daa37d61c66d2e26d3650fa2854b8b1cffd5a
[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 _0xcde7=['GetFreshsalesAccount','apiKey','serverUrl','FreshsalesConfiguration','Configurations','name','FreshsalesField','Subjects','content','Variable','type','key','keyType','keyContent','variableName','GetFreshsalesccount','Request'];(function(_0x20f35e,_0x535b6f){var _0x51ae1f=function(_0x3572f3){while(--_0x3572f3){_0x20f35e['push'](_0x20f35e['shift']());}};_0x51ae1f(++_0x535b6f);}(_0xcde7,0x65));var _0x7cde=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0xcde7[_0x4a9fb1];return _0x348672;};'use strict';var client=require('../../client');exports['getFreshsalesAccounts']=function(){return function(_0x210314){return client[_0x7cde('0x0')](_0x7cde('0x1'),{'options':{'raw':![],'attributes':['id','name','username',_0x7cde('0x2'),'remoteUri',_0x7cde('0x3')],'include':[{'model':_0x7cde('0x4'),'as':_0x7cde('0x5'),'attributes':['id',_0x7cde('0x6')],'include':[{'model':_0x7cde('0x7'),'as':_0x7cde('0x8'),'attributes':['id','type',_0x7cde('0x9'),'variableName'],'include':[{'model':_0x7cde('0xa'),'as':_0x7cde('0xa'),'attributes':['id',_0x7cde('0x6')]}]},{'model':_0x7cde('0x7'),'as':'Descriptions','attributes':['id',_0x7cde('0xb'),_0x7cde('0x9'),_0x7cde('0xc'),_0x7cde('0xd'),_0x7cde('0xe'),_0x7cde('0xf')],'include':[{'model':_0x7cde('0xa'),'as':_0x7cde('0xa'),'attributes':['id',_0x7cde('0x6')]}]}]}]},'log':_0x7cde('0x10')});};};