6e8e667129c4eed290feaadafb0f859487a542eb
[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 _0x235a=['key','GetFreshsalesccount','../../client','getFreshsalesAccounts','GetFreshsalesAccount','username','apiKey','remoteUri','serverUrl','FreshsalesConfiguration','Configurations','name','FreshsalesField','type','content','variableName','Variable'];(function(_0x42fc8e,_0x26620d){var _0x4ad7b5=function(_0x4b217b){while(--_0x4b217b){_0x42fc8e['push'](_0x42fc8e['shift']());}};_0x4ad7b5(++_0x26620d);}(_0x235a,0x1ef));var _0xa235=function(_0x539780,_0x50b102){_0x539780=_0x539780-0x0;var _0x4dd538=_0x235a[_0x539780];return _0x4dd538;};'use strict';var client=require(_0xa235('0x0'));exports[_0xa235('0x1')]=function(){return function(_0x95e7f5){return client['Request'](_0xa235('0x2'),{'options':{'raw':![],'attributes':['id','name',_0xa235('0x3'),_0xa235('0x4'),_0xa235('0x5'),_0xa235('0x6')],'include':[{'model':_0xa235('0x7'),'as':_0xa235('0x8'),'attributes':['id',_0xa235('0x9')],'include':[{'model':_0xa235('0xa'),'as':'Subjects','attributes':['id',_0xa235('0xb'),_0xa235('0xc'),_0xa235('0xd')],'include':[{'model':_0xa235('0xe'),'as':'Variable','attributes':['id',_0xa235('0x9')]}]},{'model':'FreshsalesField','as':'Descriptions','attributes':['id',_0xa235('0xb'),'content',_0xa235('0xf'),'keyType','keyContent','variableName'],'include':[{'model':_0xa235('0xe'),'as':_0xa235('0xe'),'attributes':['id',_0xa235('0x9')]}]}]}]},'log':_0xa235('0x10')});};};