340452f2e58b1c25be89428a4a0523d56337b0a6
[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 _0x277c=['Request','GetFreshsalesAccount','name','username','apiKey','remoteUri','serverUrl','Subjects','content','variableName','Variable','FreshsalesField','Descriptions','type','keyContent','GetFreshsalesccount','../../client'];(function(_0x4ad4b6,_0x62a15f){var _0x44f68e=function(_0x25d292){while(--_0x25d292){_0x4ad4b6['push'](_0x4ad4b6['shift']());}};_0x44f68e(++_0x62a15f);}(_0x277c,0x153));var _0xc277=function(_0x43ecbe,_0x57d118){_0x43ecbe=_0x43ecbe-0x0;var _0x5929df=_0x277c[_0x43ecbe];return _0x5929df;};'use strict';var client=require(_0xc277('0x0'));exports['getFreshsalesAccounts']=function(){return function(_0x2bb260){return client[_0xc277('0x1')](_0xc277('0x2'),{'options':{'raw':![],'attributes':['id',_0xc277('0x3'),_0xc277('0x4'),_0xc277('0x5'),_0xc277('0x6'),_0xc277('0x7')],'include':[{'model':'FreshsalesConfiguration','as':'Configurations','attributes':['id',_0xc277('0x3')],'include':[{'model':'FreshsalesField','as':_0xc277('0x8'),'attributes':['id','type',_0xc277('0x9'),_0xc277('0xa')],'include':[{'model':'Variable','as':_0xc277('0xb'),'attributes':['id',_0xc277('0x3')]}]},{'model':_0xc277('0xc'),'as':_0xc277('0xd'),'attributes':['id',_0xc277('0xe'),_0xc277('0x9'),'key','keyType',_0xc277('0xf'),_0xc277('0xa')],'include':[{'model':_0xc277('0xb'),'as':_0xc277('0xb'),'attributes':['id','name']}]}]}]},'log':_0xc277('0x10')});};};