66982c0d4101956afa2b9de6a406e2ec22c55930
[motion2.git] / server / services / ami / rpc / integrations / zendesk.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 _0xa8f9=['content','key','keyType','keyContent','nameField','customField','../../client','getZendeskAccounts','Request','GetZendeskAccount','name','username','password','token','serverUrl','type','Configurations','Tag','ZendeskField','variableName','Variable'];(function(_0x413feb,_0x10477f){var _0x40ee88=function(_0x32a3f6){while(--_0x32a3f6){_0x413feb['push'](_0x413feb['shift']());}};_0x40ee88(++_0x10477f);}(_0xa8f9,0x117));var _0x9a8f=function(_0x4c3604,_0x90d4cf){_0x4c3604=_0x4c3604-0x0;var _0x3391bd=_0xa8f9[_0x4c3604];return _0x3391bd;};'use strict';var client=require(_0x9a8f('0x0'));exports[_0x9a8f('0x1')]=function(){return function(_0x5d9a8d){return client[_0x9a8f('0x2')](_0x9a8f('0x3'),{'options':{'raw':![],'attributes':['id',_0x9a8f('0x4'),_0x9a8f('0x5'),_0x9a8f('0x6'),_0x9a8f('0x7'),'remoteUri','authType',_0x9a8f('0x8'),_0x9a8f('0x9')],'include':[{'model':'ZendeskConfiguration','as':_0x9a8f('0xa'),'attributes':['id',_0x9a8f('0x4')],'include':[{'model':_0x9a8f('0xb'),'attributes':['id','name']},{'model':_0x9a8f('0xc'),'as':'Subjects','attributes':['id',_0x9a8f('0x9'),'content',_0x9a8f('0xd')],'include':[{'model':_0x9a8f('0xe'),'as':_0x9a8f('0xe'),'attributes':['id',_0x9a8f('0x4')]}]},{'model':'ZendeskField','as':'Descriptions','attributes':['id','type',_0x9a8f('0xf'),_0x9a8f('0x10'),_0x9a8f('0x11'),_0x9a8f('0x12'),'variableName'],'include':[{'model':'Variable','as':'Variable','attributes':['id','name']}]},{'model':_0x9a8f('0xc'),'as':'Fields','attributes':['id',_0x9a8f('0x9'),_0x9a8f('0xf'),'idField',_0x9a8f('0x13'),_0x9a8f('0x14'),'variableName'],'include':[{'model':_0x9a8f('0xe'),'as':'Variable','attributes':['id','name']}]}]}]},'log':_0x9a8f('0x3')});};};