815bb30ce15773985f7e779da8b4a2d5a121463a
[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 _0xb458=['Tag','FreshdeskField','Subjects','type','variableName','Variable','content','Fields','idField','nameField','customField','GetFreshdeskAccount','../../client','getFreshdeskAccounts','name','username','apiKey','remoteUri','FreshdeskConfiguration'];(function(_0xa65b20,_0x4dd4de){var _0x2ce904=function(_0x1fc51a){while(--_0x1fc51a){_0xa65b20['push'](_0xa65b20['shift']());}};_0x2ce904(++_0x4dd4de);}(_0xb458,0x103));var _0x8b45=function(_0x47a332,_0x38a628){_0x47a332=_0x47a332-0x0;var _0x12d025=_0xb458[_0x47a332];return _0x12d025;};'use strict';var client=require(_0x8b45('0x0'));exports[_0x8b45('0x1')]=function(){return function(_0x4544e3){return client['Request']('GetFreshdeskAccount',{'options':{'raw':![],'attributes':['id',_0x8b45('0x2'),_0x8b45('0x3'),_0x8b45('0x4'),_0x8b45('0x5'),'serverUrl'],'include':[{'model':_0x8b45('0x6'),'as':'Configurations','attributes':['id','name'],'include':[{'model':_0x8b45('0x7'),'attributes':['id',_0x8b45('0x2')]},{'model':_0x8b45('0x8'),'as':_0x8b45('0x9'),'attributes':['id',_0x8b45('0xa'),'content',_0x8b45('0xb')],'include':[{'model':_0x8b45('0xc'),'as':_0x8b45('0xc'),'attributes':['id',_0x8b45('0x2')]}]},{'model':_0x8b45('0x8'),'as':'Descriptions','attributes':['id',_0x8b45('0xa'),_0x8b45('0xd'),'key','keyType','keyContent','variableName'],'include':[{'model':_0x8b45('0xc'),'as':_0x8b45('0xc'),'attributes':['id',_0x8b45('0x2')]}]},{'model':'FreshdeskField','as':_0x8b45('0xe'),'attributes':['id',_0x8b45('0xa'),_0x8b45('0xd'),_0x8b45('0xf'),_0x8b45('0x10'),_0x8b45('0x11'),'variableName'],'include':[{'model':'Variable','as':_0x8b45('0xc'),'attributes':['id',_0x8b45('0x2')]}]}]}]},'log':_0x8b45('0x12')});};};