Built motion from commit d5e4af8c.|2.6.23
[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 _0xe714=['GetFreshsalesAccount','name','apiKey','serverUrl','FreshsalesConfiguration','Configurations','FreshsalesField','Subjects','content','variableName','Variable','Descriptions','type','key','keyType','keyContent','GetFreshsalesccount','../../client','Request'];(function(_0x22a524,_0x32c0d0){var _0x2ebb53=function(_0x4899a6){while(--_0x4899a6){_0x22a524['push'](_0x22a524['shift']());}};_0x2ebb53(++_0x32c0d0);}(_0xe714,0xe2));var _0x4e71=function(_0x5c46ea,_0x30d8a0){_0x5c46ea=_0x5c46ea-0x0;var _0x233375=_0xe714[_0x5c46ea];return _0x233375;};'use strict';var client=require(_0x4e71('0x0'));exports['getFreshsalesAccounts']=function(){return function(_0x36da97){return client[_0x4e71('0x1')](_0x4e71('0x2'),{'options':{'raw':![],'attributes':['id',_0x4e71('0x3'),'username',_0x4e71('0x4'),'remoteUri',_0x4e71('0x5')],'include':[{'model':_0x4e71('0x6'),'as':_0x4e71('0x7'),'attributes':['id',_0x4e71('0x3')],'include':[{'model':_0x4e71('0x8'),'as':_0x4e71('0x9'),'attributes':['id','type',_0x4e71('0xa'),_0x4e71('0xb')],'include':[{'model':_0x4e71('0xc'),'as':'Variable','attributes':['id',_0x4e71('0x3')]}]},{'model':'FreshsalesField','as':_0x4e71('0xd'),'attributes':['id',_0x4e71('0xe'),_0x4e71('0xa'),_0x4e71('0xf'),_0x4e71('0x10'),_0x4e71('0x11'),_0x4e71('0xb')],'include':[{'model':_0x4e71('0xc'),'as':'Variable','attributes':['id',_0x4e71('0x3')]}]}]}]},'log':_0x4e71('0x12')});};};