398f96aabbaa9ccff94d1bd74a293ec18c6d298e
[motion2.git] / server / services / ami / rpc / integrations / freshdesk.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 _0xffd6=['keyType','keyContent','Fields','idField','nameField','customField','GetFreshdeskAccount','../../client','getFreshdeskAccounts','Request','username','remoteUri','serverUrl','Configurations','name','FreshdeskField','type','content','variableName','Variable','Descriptions','key'];(function(_0x3b12a1,_0x46e334){var _0x2f7c46=function(_0x6e4fc1){while(--_0x6e4fc1){_0x3b12a1['push'](_0x3b12a1['shift']());}};_0x2f7c46(++_0x46e334);}(_0xffd6,0x17d));var _0x6ffd=function(_0x49052b,_0x3ba709){_0x49052b=_0x49052b-0x0;var _0x48c045=_0xffd6[_0x49052b];return _0x48c045;};'use strict';var client=require(_0x6ffd('0x0'));exports[_0x6ffd('0x1')]=function(){return function(_0x5e6376){return client[_0x6ffd('0x2')]('GetFreshdeskAccount',{'options':{'raw':![],'attributes':['id','name',_0x6ffd('0x3'),'apiKey',_0x6ffd('0x4'),_0x6ffd('0x5')],'include':[{'model':'FreshdeskConfiguration','as':_0x6ffd('0x6'),'attributes':['id',_0x6ffd('0x7')],'include':[{'model':'Tag','attributes':['id',_0x6ffd('0x7')]},{'model':_0x6ffd('0x8'),'as':'Subjects','attributes':['id',_0x6ffd('0x9'),_0x6ffd('0xa'),_0x6ffd('0xb')],'include':[{'model':_0x6ffd('0xc'),'as':_0x6ffd('0xc'),'attributes':['id','name']}]},{'model':_0x6ffd('0x8'),'as':_0x6ffd('0xd'),'attributes':['id',_0x6ffd('0x9'),'content',_0x6ffd('0xe'),_0x6ffd('0xf'),_0x6ffd('0x10'),'variableName'],'include':[{'model':_0x6ffd('0xc'),'as':_0x6ffd('0xc'),'attributes':['id',_0x6ffd('0x7')]}]},{'model':_0x6ffd('0x8'),'as':_0x6ffd('0x11'),'attributes':['id',_0x6ffd('0x9'),_0x6ffd('0xa'),_0x6ffd('0x12'),_0x6ffd('0x13'),_0x6ffd('0x14'),'variableName'],'include':[{'model':_0x6ffd('0xc'),'as':_0x6ffd('0xc'),'attributes':['id','name']}]}]}]},'log':_0x6ffd('0x15')});};};