Built motion from commit 9e1399f3.|2.5.37
[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 _0x88c7=['key','keyType','keyContent','idField','nameField','customField','../../client','Request','GetFreshdeskAccount','apiKey','remoteUri','FreshdeskConfiguration','Configurations','Tag','name','type','content','variableName','Variable','FreshdeskField','Descriptions'];(function(_0x40674e,_0x29a993){var _0x244bb1=function(_0x43844c){while(--_0x43844c){_0x40674e['push'](_0x40674e['shift']());}};_0x244bb1(++_0x29a993);}(_0x88c7,0x6f));var _0x788c=function(_0x11d95a,_0x4acb09){_0x11d95a=_0x11d95a-0x0;var _0x37443d=_0x88c7[_0x11d95a];return _0x37443d;};'use strict';var client=require(_0x788c('0x0'));exports['getFreshdeskAccounts']=function(){return function(_0x4ea651){return client[_0x788c('0x1')](_0x788c('0x2'),{'options':{'raw':![],'attributes':['id','name','username',_0x788c('0x3'),_0x788c('0x4'),'serverUrl'],'include':[{'model':_0x788c('0x5'),'as':_0x788c('0x6'),'attributes':['id','name'],'include':[{'model':_0x788c('0x7'),'attributes':['id',_0x788c('0x8')]},{'model':'FreshdeskField','as':'Subjects','attributes':['id',_0x788c('0x9'),_0x788c('0xa'),_0x788c('0xb')],'include':[{'model':_0x788c('0xc'),'as':_0x788c('0xc'),'attributes':['id','name']}]},{'model':_0x788c('0xd'),'as':_0x788c('0xe'),'attributes':['id',_0x788c('0x9'),'content',_0x788c('0xf'),_0x788c('0x10'),_0x788c('0x11'),_0x788c('0xb')],'include':[{'model':_0x788c('0xc'),'as':_0x788c('0xc'),'attributes':['id','name']}]},{'model':_0x788c('0xd'),'as':'Fields','attributes':['id',_0x788c('0x9'),'content',_0x788c('0x12'),_0x788c('0x13'),_0x788c('0x14'),_0x788c('0xb')],'include':[{'model':_0x788c('0xc'),'as':_0x788c('0xc'),'attributes':['id',_0x788c('0x8')]}]}]}]},'log':_0x788c('0x2')});};};