80c66b3d90bd9c5bd8d5c027b90308c3dbc2f36d
[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 _0x4074=['serverUrl','FreshsalesConfiguration','Configurations','FreshsalesField','type','variableName','Variable','content','key','keyType','keyContent','GetFreshsalesccount','../../client','getFreshsalesAccounts','GetFreshsalesAccount','name','username','apiKey','remoteUri'];(function(_0x5a10d5,_0x5cc616){var _0x4c6b6d=function(_0x3df96f){while(--_0x3df96f){_0x5a10d5['push'](_0x5a10d5['shift']());}};_0x4c6b6d(++_0x5cc616);}(_0x4074,0xf0));var _0x4407=function(_0x209884,_0x246a01){_0x209884=_0x209884-0x0;var _0x4560db=_0x4074[_0x209884];return _0x4560db;};'use strict';var client=require(_0x4407('0x0'));exports[_0x4407('0x1')]=function(){return function(_0x1f9dc4){return client['Request'](_0x4407('0x2'),{'options':{'raw':![],'attributes':['id',_0x4407('0x3'),_0x4407('0x4'),_0x4407('0x5'),_0x4407('0x6'),_0x4407('0x7')],'include':[{'model':_0x4407('0x8'),'as':_0x4407('0x9'),'attributes':['id',_0x4407('0x3')],'include':[{'model':_0x4407('0xa'),'as':'Subjects','attributes':['id',_0x4407('0xb'),'content',_0x4407('0xc')],'include':[{'model':_0x4407('0xd'),'as':_0x4407('0xd'),'attributes':['id','name']}]},{'model':'FreshsalesField','as':'Descriptions','attributes':['id',_0x4407('0xb'),_0x4407('0xe'),_0x4407('0xf'),_0x4407('0x10'),_0x4407('0x11'),_0x4407('0xc')],'include':[{'model':_0x4407('0xd'),'as':_0x4407('0xd'),'attributes':['id',_0x4407('0x3')]}]}]}]},'log':_0x4407('0x12')});};};