539bf1c00d559449f21885d487713946f08ade7a
[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 _0x8c46=['FreshsalesField','Subjects','type','variableName','Variable','Descriptions','keyType','keyContent','GetFreshsalesccount','../../client','Request','username','apiKey','remoteUri','serverUrl','FreshsalesConfiguration','Configurations','name'];(function(_0x2c3bd9,_0x45f815){var _0x112e55=function(_0x22de25){while(--_0x22de25){_0x2c3bd9['push'](_0x2c3bd9['shift']());}};_0x112e55(++_0x45f815);}(_0x8c46,0x171));var _0x68c4=function(_0x201939,_0x3f1b73){_0x201939=_0x201939-0x0;var _0x43e6c5=_0x8c46[_0x201939];return _0x43e6c5;};'use strict';var client=require(_0x68c4('0x0'));exports['getFreshsalesAccounts']=function(){return function(_0x51f442){return client[_0x68c4('0x1')]('GetFreshsalesAccount',{'options':{'raw':![],'attributes':['id','name',_0x68c4('0x2'),_0x68c4('0x3'),_0x68c4('0x4'),_0x68c4('0x5')],'include':[{'model':_0x68c4('0x6'),'as':_0x68c4('0x7'),'attributes':['id',_0x68c4('0x8')],'include':[{'model':_0x68c4('0x9'),'as':_0x68c4('0xa'),'attributes':['id',_0x68c4('0xb'),'content',_0x68c4('0xc')],'include':[{'model':_0x68c4('0xd'),'as':_0x68c4('0xd'),'attributes':['id','name']}]},{'model':_0x68c4('0x9'),'as':_0x68c4('0xe'),'attributes':['id',_0x68c4('0xb'),'content','key',_0x68c4('0xf'),_0x68c4('0x10'),'variableName'],'include':[{'model':'Variable','as':_0x68c4('0xd'),'attributes':['id',_0x68c4('0x8')]}]}]}]},'log':_0x68c4('0x11')});};};