4a69337fdf869968cadc74101bf03fd0c2ffb81a
[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 _0x6629=['content','variableName','Variable','FreshdeskField','Descriptions','type','key','keyType','Fields','customField','../../client','Request','GetFreshdeskAccount','name','username','remoteUri','serverUrl','FreshdeskConfiguration','Tag','Subjects'];(function(_0x2077c2,_0x275ab5){var _0x312f9f=function(_0x331435){while(--_0x331435){_0x2077c2['push'](_0x2077c2['shift']());}};_0x312f9f(++_0x275ab5);}(_0x6629,0x1c2));var _0x9662=function(_0x53cf53,_0x459a53){_0x53cf53=_0x53cf53-0x0;var _0x4eeb8a=_0x6629[_0x53cf53];return _0x4eeb8a;};'use strict';var client=require(_0x9662('0x0'));exports['getFreshdeskAccounts']=function(){return function(_0x5471a3){return client[_0x9662('0x1')](_0x9662('0x2'),{'options':{'raw':![],'attributes':['id',_0x9662('0x3'),_0x9662('0x4'),'apiKey',_0x9662('0x5'),_0x9662('0x6')],'include':[{'model':_0x9662('0x7'),'as':'Configurations','attributes':['id',_0x9662('0x3')],'include':[{'model':_0x9662('0x8'),'attributes':['id',_0x9662('0x3')]},{'model':'FreshdeskField','as':_0x9662('0x9'),'attributes':['id','type',_0x9662('0xa'),_0x9662('0xb')],'include':[{'model':_0x9662('0xc'),'as':_0x9662('0xc'),'attributes':['id',_0x9662('0x3')]}]},{'model':_0x9662('0xd'),'as':_0x9662('0xe'),'attributes':['id',_0x9662('0xf'),_0x9662('0xa'),_0x9662('0x10'),_0x9662('0x11'),'keyContent',_0x9662('0xb')],'include':[{'model':'Variable','as':_0x9662('0xc'),'attributes':['id',_0x9662('0x3')]}]},{'model':'FreshdeskField','as':_0x9662('0x12'),'attributes':['id',_0x9662('0xf'),_0x9662('0xa'),'idField','nameField',_0x9662('0x13'),'variableName'],'include':[{'model':_0x9662('0xc'),'as':_0x9662('0xc'),'attributes':['id',_0x9662('0x3')]}]}]}]},'log':'GetFreshdeskAccount'});};};