58652194a93c4b1c077856de16f56a7dda231126
[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 _0xd0e7=['Request','GetZendeskAccount','name','username','token','remoteUri','type','ZendeskConfiguration','Configurations','Tag','ZendeskField','variableName','Variable','Descriptions','content','key','keyType','keyContent','idField','customField','../../client'];(function(_0xf26d40,_0x2f4f46){var _0x50b68c=function(_0x10aa58){while(--_0x10aa58){_0xf26d40['push'](_0xf26d40['shift']());}};_0x50b68c(++_0x2f4f46);}(_0xd0e7,0x1cd));var _0x7d0e=function(_0x346737,_0x3e6081){_0x346737=_0x346737-0x0;var _0x1ade2e=_0xd0e7[_0x346737];return _0x1ade2e;};'use strict';var client=require(_0x7d0e('0x0'));exports['getZendeskAccounts']=function(){return function(_0x544826){return client[_0x7d0e('0x1')](_0x7d0e('0x2'),{'options':{'raw':![],'attributes':['id',_0x7d0e('0x3'),_0x7d0e('0x4'),'password',_0x7d0e('0x5'),_0x7d0e('0x6'),'authType','serverUrl',_0x7d0e('0x7')],'include':[{'model':_0x7d0e('0x8'),'as':_0x7d0e('0x9'),'attributes':['id',_0x7d0e('0x3')],'include':[{'model':_0x7d0e('0xa'),'attributes':['id',_0x7d0e('0x3')]},{'model':_0x7d0e('0xb'),'as':'Subjects','attributes':['id',_0x7d0e('0x7'),'content',_0x7d0e('0xc')],'include':[{'model':_0x7d0e('0xd'),'as':'Variable','attributes':['id',_0x7d0e('0x3')]}]},{'model':'ZendeskField','as':_0x7d0e('0xe'),'attributes':['id',_0x7d0e('0x7'),_0x7d0e('0xf'),_0x7d0e('0x10'),_0x7d0e('0x11'),_0x7d0e('0x12'),'variableName'],'include':[{'model':_0x7d0e('0xd'),'as':_0x7d0e('0xd'),'attributes':['id',_0x7d0e('0x3')]}]},{'model':_0x7d0e('0xb'),'as':'Fields','attributes':['id',_0x7d0e('0x7'),'content',_0x7d0e('0x13'),'nameField',_0x7d0e('0x14'),_0x7d0e('0xc')],'include':[{'model':_0x7d0e('0xd'),'as':'Variable','attributes':['id',_0x7d0e('0x3')]}]}]}]},'log':_0x7d0e('0x2')});};};