Built motion from commit 013e4bb4.|2.6.18
[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 _0xbff5=['remoteUri','Configurations','FreshsalesField','Subjects','type','content','variableName','Variable','keyType','../../client','getFreshsalesAccounts','Request','GetFreshsalesAccount','name','username'];(function(_0x1b348e,_0x5a8dd9){var _0x47580f=function(_0x43d5f6){while(--_0x43d5f6){_0x1b348e['push'](_0x1b348e['shift']());}};_0x47580f(++_0x5a8dd9);}(_0xbff5,0x1bc));var _0x5bff=function(_0x41f4b0,_0x27224a){_0x41f4b0=_0x41f4b0-0x0;var _0x29a6d7=_0xbff5[_0x41f4b0];return _0x29a6d7;};'use strict';var client=require(_0x5bff('0x0'));exports[_0x5bff('0x1')]=function(){return function(_0xd96d55){return client[_0x5bff('0x2')](_0x5bff('0x3'),{'options':{'raw':![],'attributes':['id',_0x5bff('0x4'),_0x5bff('0x5'),'apiKey',_0x5bff('0x6'),'serverUrl'],'include':[{'model':'FreshsalesConfiguration','as':_0x5bff('0x7'),'attributes':['id',_0x5bff('0x4')],'include':[{'model':_0x5bff('0x8'),'as':_0x5bff('0x9'),'attributes':['id',_0x5bff('0xa'),_0x5bff('0xb'),_0x5bff('0xc')],'include':[{'model':_0x5bff('0xd'),'as':_0x5bff('0xd'),'attributes':['id','name']}]},{'model':_0x5bff('0x8'),'as':'Descriptions','attributes':['id',_0x5bff('0xa'),_0x5bff('0xb'),'key',_0x5bff('0xe'),'keyContent',_0x5bff('0xc')],'include':[{'model':'Variable','as':_0x5bff('0xd'),'attributes':['id',_0x5bff('0x4')]}]}]}]},'log':'GetFreshsalesccount'});};};