d11076dd9973f359097136e5bff88cac3bbdc958
[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 _0xc204=['username','password','remoteUri','authType','serverUrl','type','ZendeskConfiguration','Configurations','Tag','ZendeskField','Subjects','content','variableName','Variable','key','keyType','keyContent','Fields','idField','nameField','../../client','Request','GetZendeskAccount','name'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0xc204,0xbc));var _0x4c20=function(_0x206c3d,_0x3ff35c){_0x206c3d=_0x206c3d-0x0;var _0x2b19b7=_0xc204[_0x206c3d];return _0x2b19b7;};'use strict';var client=require(_0x4c20('0x0'));exports['getZendeskAccounts']=function(){return function(_0x38f39b){return client[_0x4c20('0x1')](_0x4c20('0x2'),{'options':{'raw':![],'attributes':['id',_0x4c20('0x3'),_0x4c20('0x4'),_0x4c20('0x5'),'token',_0x4c20('0x6'),_0x4c20('0x7'),_0x4c20('0x8'),_0x4c20('0x9')],'include':[{'model':_0x4c20('0xa'),'as':_0x4c20('0xb'),'attributes':['id',_0x4c20('0x3')],'include':[{'model':_0x4c20('0xc'),'attributes':['id','name']},{'model':_0x4c20('0xd'),'as':_0x4c20('0xe'),'attributes':['id','type',_0x4c20('0xf'),_0x4c20('0x10')],'include':[{'model':_0x4c20('0x11'),'as':_0x4c20('0x11'),'attributes':['id',_0x4c20('0x3')]}]},{'model':_0x4c20('0xd'),'as':'Descriptions','attributes':['id',_0x4c20('0x9'),_0x4c20('0xf'),_0x4c20('0x12'),_0x4c20('0x13'),_0x4c20('0x14'),_0x4c20('0x10')],'include':[{'model':_0x4c20('0x11'),'as':'Variable','attributes':['id','name']}]},{'model':_0x4c20('0xd'),'as':_0x4c20('0x15'),'attributes':['id',_0x4c20('0x9'),'content',_0x4c20('0x16'),_0x4c20('0x17'),'customField','variableName'],'include':[{'model':_0x4c20('0x11'),'as':_0x4c20('0x11'),'attributes':['id','name']}]}]}]},'log':_0x4c20('0x2')});};};