e5f4e5c0c594517c60d255e82837f0a9fa852d86
[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 _0x06c8=['type','content','variableName','Variable','keyType','keyContent','customField','Request','GetZendeskAccount','name','username','remoteUri','ZendeskConfiguration','ZendeskField'];(function(_0x4839eb,_0x40fb9c){var _0x2f5908=function(_0x486ec8){while(--_0x486ec8){_0x4839eb['push'](_0x4839eb['shift']());}};_0x2f5908(++_0x40fb9c);}(_0x06c8,0x1d5));var _0x806c=function(_0x5168b9,_0x306617){_0x5168b9=_0x5168b9-0x0;var _0x42873b=_0x06c8[_0x5168b9];return _0x42873b;};'use strict';var client=require('../../client');exports['getZendeskAccounts']=function(){return function(_0x43546c){return client[_0x806c('0x0')](_0x806c('0x1'),{'options':{'raw':![],'attributes':['id',_0x806c('0x2'),_0x806c('0x3'),'password','token',_0x806c('0x4'),'authType','serverUrl','type'],'include':[{'model':_0x806c('0x5'),'as':'Configurations','attributes':['id','name'],'include':[{'model':'Tag','attributes':['id',_0x806c('0x2')]},{'model':_0x806c('0x6'),'as':'Subjects','attributes':['id',_0x806c('0x7'),_0x806c('0x8'),_0x806c('0x9')],'include':[{'model':_0x806c('0xa'),'as':_0x806c('0xa'),'attributes':['id','name']}]},{'model':'ZendeskField','as':'Descriptions','attributes':['id',_0x806c('0x7'),_0x806c('0x8'),'key',_0x806c('0xb'),_0x806c('0xc'),_0x806c('0x9')],'include':[{'model':_0x806c('0xa'),'as':_0x806c('0xa'),'attributes':['id',_0x806c('0x2')]}]},{'model':_0x806c('0x6'),'as':'Fields','attributes':['id','type',_0x806c('0x8'),'idField','nameField',_0x806c('0xd'),_0x806c('0x9')],'include':[{'model':'Variable','as':_0x806c('0xa'),'attributes':['id',_0x806c('0x2')]}]}]}]},'log':_0x806c('0x1')});};};