306f7e51c7bce37429d3a6df3243b648ed141b8f
[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 _0xe812=['variableName','GetFreshsalesccount','getFreshsalesAccounts','name','username','remoteUri','serverUrl','Configurations','Subjects','type','content','Variable','FreshsalesField','key','keyType','keyContent'];(function(_0x2839bd,_0x5dfc67){var _0x16df0f=function(_0x473dec){while(--_0x473dec){_0x2839bd['push'](_0x2839bd['shift']());}};_0x16df0f(++_0x5dfc67);}(_0xe812,0x1f2));var _0x2e81=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe812[_0x3dd15e];return _0x231fd0;};'use strict';var client=require('../../client');exports[_0x2e81('0x0')]=function(){return function(_0x46bf6b){return client['Request']('GetFreshsalesAccount',{'options':{'raw':![],'attributes':['id',_0x2e81('0x1'),_0x2e81('0x2'),'apiKey',_0x2e81('0x3'),_0x2e81('0x4')],'include':[{'model':'FreshsalesConfiguration','as':_0x2e81('0x5'),'attributes':['id',_0x2e81('0x1')],'include':[{'model':'FreshsalesField','as':_0x2e81('0x6'),'attributes':['id',_0x2e81('0x7'),_0x2e81('0x8'),'variableName'],'include':[{'model':_0x2e81('0x9'),'as':_0x2e81('0x9'),'attributes':['id',_0x2e81('0x1')]}]},{'model':_0x2e81('0xa'),'as':'Descriptions','attributes':['id',_0x2e81('0x7'),_0x2e81('0x8'),_0x2e81('0xb'),_0x2e81('0xc'),_0x2e81('0xd'),_0x2e81('0xe')],'include':[{'model':_0x2e81('0x9'),'as':_0x2e81('0x9'),'attributes':['id',_0x2e81('0x1')]}]}]}]},'log':_0x2e81('0xf')});};};