bc634fec149160d34d48be66630cec2fc34efbf2
[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 _0xd4b2=['authType','serverUrl','type','ZendeskConfiguration','Configurations','Tag','ZendeskField','variableName','Variable','Descriptions','key','keyType','keyContent','nameField','Request','GetZendeskAccount','name','username','password','token','remoteUri'];(function(_0x3ef2d5,_0x423d46){var _0x2fefb2=function(_0x54f82f){while(--_0x54f82f){_0x3ef2d5['push'](_0x3ef2d5['shift']());}};_0x2fefb2(++_0x423d46);}(_0xd4b2,0x77));var _0x2d4b=function(_0x58f65e,_0x467d61){_0x58f65e=_0x58f65e-0x0;var _0x35684b=_0xd4b2[_0x58f65e];return _0x35684b;};'use strict';var client=require('../../client');exports['getZendeskAccounts']=function(){return function(_0x4113a3){return client[_0x2d4b('0x0')](_0x2d4b('0x1'),{'options':{'raw':![],'attributes':['id',_0x2d4b('0x2'),_0x2d4b('0x3'),_0x2d4b('0x4'),_0x2d4b('0x5'),_0x2d4b('0x6'),_0x2d4b('0x7'),_0x2d4b('0x8'),_0x2d4b('0x9')],'include':[{'model':_0x2d4b('0xa'),'as':_0x2d4b('0xb'),'attributes':['id',_0x2d4b('0x2')],'include':[{'model':_0x2d4b('0xc'),'attributes':['id',_0x2d4b('0x2')]},{'model':_0x2d4b('0xd'),'as':'Subjects','attributes':['id',_0x2d4b('0x9'),'content',_0x2d4b('0xe')],'include':[{'model':_0x2d4b('0xf'),'as':_0x2d4b('0xf'),'attributes':['id',_0x2d4b('0x2')]}]},{'model':'ZendeskField','as':_0x2d4b('0x10'),'attributes':['id','type','content',_0x2d4b('0x11'),_0x2d4b('0x12'),_0x2d4b('0x13'),_0x2d4b('0xe')],'include':[{'model':'Variable','as':'Variable','attributes':['id','name']}]},{'model':_0x2d4b('0xd'),'as':'Fields','attributes':['id','type','content','idField',_0x2d4b('0x14'),'customField',_0x2d4b('0xe')],'include':[{'model':_0x2d4b('0xf'),'as':_0x2d4b('0xf'),'attributes':['id',_0x2d4b('0x2')]}]}]}]},'log':_0x2d4b('0x1')});};};