b043c5b857421422c194fa1cb69be0cf1793e2be
[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 _0x446c=['Variable','Descriptions','type','key','keyContent','GetFreshsalesccount','../../client','getFreshsalesAccounts','Request','name','username','apiKey','serverUrl','FreshsalesField','content','variableName'];(function(_0x463d71,_0x1dd63e){var _0x332126=function(_0x741b59){while(--_0x741b59){_0x463d71['push'](_0x463d71['shift']());}};_0x332126(++_0x1dd63e);}(_0x446c,0x156));var _0xc446=function(_0x1e9e56,_0x34a74a){_0x1e9e56=_0x1e9e56-0x0;var _0x5d5e2e=_0x446c[_0x1e9e56];return _0x5d5e2e;};'use strict';var client=require(_0xc446('0x0'));exports[_0xc446('0x1')]=function(){return function(_0x641f30){return client[_0xc446('0x2')]('GetFreshsalesAccount',{'options':{'raw':![],'attributes':['id',_0xc446('0x3'),_0xc446('0x4'),_0xc446('0x5'),'remoteUri',_0xc446('0x6')],'include':[{'model':'FreshsalesConfiguration','as':'Configurations','attributes':['id',_0xc446('0x3')],'include':[{'model':_0xc446('0x7'),'as':'Subjects','attributes':['id','type',_0xc446('0x8'),_0xc446('0x9')],'include':[{'model':_0xc446('0xa'),'as':_0xc446('0xa'),'attributes':['id',_0xc446('0x3')]}]},{'model':'FreshsalesField','as':_0xc446('0xb'),'attributes':['id',_0xc446('0xc'),_0xc446('0x8'),_0xc446('0xd'),'keyType',_0xc446('0xe'),_0xc446('0x9')],'include':[{'model':_0xc446('0xa'),'as':_0xc446('0xa'),'attributes':['id',_0xc446('0x3')]}]}]}]},'log':_0xc446('0xf')});};};