511e3da6af566b6ce2f26f1e18997a2772ed47ee
[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 _0x7fe1=['content','variableName','Variable','keyType','keyContent','Fields','nameField','../../client','getFreshdeskAccounts','Request','GetFreshdeskAccount','name','apiKey','serverUrl','Tag','FreshdeskField','type'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x7fe1,0xf5));var _0x17fe=function(_0x5d8424,_0x4c4b47){_0x5d8424=_0x5d8424-0x0;var _0x39b72c=_0x7fe1[_0x5d8424];return _0x39b72c;};'use strict';var client=require(_0x17fe('0x0'));exports[_0x17fe('0x1')]=function(){return function(_0x4a2264){return client[_0x17fe('0x2')](_0x17fe('0x3'),{'options':{'raw':![],'attributes':['id',_0x17fe('0x4'),'username',_0x17fe('0x5'),'remoteUri',_0x17fe('0x6')],'include':[{'model':'FreshdeskConfiguration','as':'Configurations','attributes':['id',_0x17fe('0x4')],'include':[{'model':_0x17fe('0x7'),'attributes':['id','name']},{'model':_0x17fe('0x8'),'as':'Subjects','attributes':['id',_0x17fe('0x9'),_0x17fe('0xa'),_0x17fe('0xb')],'include':[{'model':_0x17fe('0xc'),'as':'Variable','attributes':['id',_0x17fe('0x4')]}]},{'model':_0x17fe('0x8'),'as':'Descriptions','attributes':['id',_0x17fe('0x9'),'content','key',_0x17fe('0xd'),_0x17fe('0xe'),'variableName'],'include':[{'model':_0x17fe('0xc'),'as':_0x17fe('0xc'),'attributes':['id',_0x17fe('0x4')]}]},{'model':_0x17fe('0x8'),'as':_0x17fe('0xf'),'attributes':['id','type',_0x17fe('0xa'),'idField',_0x17fe('0x10'),'customField',_0x17fe('0xb')],'include':[{'model':_0x17fe('0xc'),'as':_0x17fe('0xc'),'attributes':['id',_0x17fe('0x4')]}]}]}]},'log':_0x17fe('0x3')});};};