58352a86403e01bae3ee3748b28bfff6b2d6a408
[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 _0x6aa7=['apiKey','remoteUri','serverUrl','FreshdeskField','Subjects','content','variableName','Variable','Descriptions','type','key','keyType','keyContent','Fields','idField','nameField','../../client','Request','GetFreshdeskAccount','name'];(function(_0x27fa56,_0x4def9b){var _0x25b2bc=function(_0x5b98e4){while(--_0x5b98e4){_0x27fa56['push'](_0x27fa56['shift']());}};_0x25b2bc(++_0x4def9b);}(_0x6aa7,0x178));var _0x76aa=function(_0x2f8391,_0x406236){_0x2f8391=_0x2f8391-0x0;var _0x517d2a=_0x6aa7[_0x2f8391];return _0x517d2a;};'use strict';var client=require(_0x76aa('0x0'));exports['getFreshdeskAccounts']=function(){return function(_0x2cbbdd){return client[_0x76aa('0x1')](_0x76aa('0x2'),{'options':{'raw':![],'attributes':['id',_0x76aa('0x3'),'username',_0x76aa('0x4'),_0x76aa('0x5'),_0x76aa('0x6')],'include':[{'model':'FreshdeskConfiguration','as':'Configurations','attributes':['id',_0x76aa('0x3')],'include':[{'model':'Tag','attributes':['id',_0x76aa('0x3')]},{'model':_0x76aa('0x7'),'as':_0x76aa('0x8'),'attributes':['id','type',_0x76aa('0x9'),_0x76aa('0xa')],'include':[{'model':_0x76aa('0xb'),'as':'Variable','attributes':['id',_0x76aa('0x3')]}]},{'model':_0x76aa('0x7'),'as':_0x76aa('0xc'),'attributes':['id',_0x76aa('0xd'),_0x76aa('0x9'),_0x76aa('0xe'),_0x76aa('0xf'),_0x76aa('0x10'),_0x76aa('0xa')],'include':[{'model':_0x76aa('0xb'),'as':'Variable','attributes':['id',_0x76aa('0x3')]}]},{'model':'FreshdeskField','as':_0x76aa('0x11'),'attributes':['id',_0x76aa('0xd'),_0x76aa('0x9'),_0x76aa('0x12'),_0x76aa('0x13'),'customField','variableName'],'include':[{'model':_0x76aa('0xb'),'as':'Variable','attributes':['id',_0x76aa('0x3')]}]}]}]},'log':_0x76aa('0x2')});};};