Built motion from commit 25580385.|2.6.2
[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 _0x5d58=['username','remoteUri','serverUrl','Configurations','FreshsalesField','Subjects','content','variableName','Variable','Descriptions','type','keyContent','GetFreshsalesccount','name'];(function(_0x2e2ea3,_0x142fc6){var _0x3487f0=function(_0x501ceb){while(--_0x501ceb){_0x2e2ea3['push'](_0x2e2ea3['shift']());}};_0x3487f0(++_0x142fc6);}(_0x5d58,0x187));var _0x85d5=function(_0x10a2e6,_0x573d72){_0x10a2e6=_0x10a2e6-0x0;var _0x1aaac1=_0x5d58[_0x10a2e6];return _0x1aaac1;};'use strict';var client=require('../../client');exports['getFreshsalesAccounts']=function(){return function(_0x5e2da7){return client['Request']('GetFreshsalesAccount',{'options':{'raw':![],'attributes':['id',_0x85d5('0x0'),_0x85d5('0x1'),'apiKey',_0x85d5('0x2'),_0x85d5('0x3')],'include':[{'model':'FreshsalesConfiguration','as':_0x85d5('0x4'),'attributes':['id',_0x85d5('0x0')],'include':[{'model':_0x85d5('0x5'),'as':_0x85d5('0x6'),'attributes':['id','type',_0x85d5('0x7'),_0x85d5('0x8')],'include':[{'model':'Variable','as':_0x85d5('0x9'),'attributes':['id','name']}]},{'model':_0x85d5('0x5'),'as':_0x85d5('0xa'),'attributes':['id',_0x85d5('0xb'),'content','key','keyType',_0x85d5('0xc'),_0x85d5('0x8')],'include':[{'model':_0x85d5('0x9'),'as':_0x85d5('0x9'),'attributes':['id',_0x85d5('0x0')]}]}]}]},'log':_0x85d5('0xd')});};};