c6659190ffbf8b294546c309b84b412b923e3e50
[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 _0x1bd1=['keyType','keyContent','GetFreshsalesccount','../../client','getFreshsalesAccounts','GetFreshsalesAccount','serverUrl','FreshsalesConfiguration','Configurations','name','Subjects','type','content','variableName','Variable','key'];(function(_0x3dc485,_0x358065){var _0x163fd0=function(_0x5bfb36){while(--_0x5bfb36){_0x3dc485['push'](_0x3dc485['shift']());}};_0x163fd0(++_0x358065);}(_0x1bd1,0x123));var _0x11bd=function(_0x1e6419,_0x170099){_0x1e6419=_0x1e6419-0x0;var _0x131da0=_0x1bd1[_0x1e6419];return _0x131da0;};'use strict';var client=require(_0x11bd('0x0'));exports[_0x11bd('0x1')]=function(){return function(_0x1d1834){return client['Request'](_0x11bd('0x2'),{'options':{'raw':![],'attributes':['id','name','username','apiKey','remoteUri',_0x11bd('0x3')],'include':[{'model':_0x11bd('0x4'),'as':_0x11bd('0x5'),'attributes':['id',_0x11bd('0x6')],'include':[{'model':'FreshsalesField','as':_0x11bd('0x7'),'attributes':['id',_0x11bd('0x8'),_0x11bd('0x9'),_0x11bd('0xa')],'include':[{'model':_0x11bd('0xb'),'as':'Variable','attributes':['id',_0x11bd('0x6')]}]},{'model':'FreshsalesField','as':'Descriptions','attributes':['id',_0x11bd('0x8'),_0x11bd('0x9'),_0x11bd('0xc'),_0x11bd('0xd'),_0x11bd('0xe'),_0x11bd('0xa')],'include':[{'model':_0x11bd('0xb'),'as':_0x11bd('0xb'),'attributes':['id','name']}]}]}]},'log':_0x11bd('0xf')});};};