f22974b7a8d63ec1c580db8b6cd21db3add756c6
[motion2.git] / server / services / ami / rpc / integrations / servicenow.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 _0x9f62=['content','key','keyContent','variableName','Fields','idField','nameField','customField','Variable','GetServicenowkAccount','getServicenowAccounts','Request','GetServicenowAccount','name','password','email','remoteUri','serverUrl','Configurations','ServicenowField','Subjects','type'];(function(_0x40ff79,_0x578a04){var _0x32234c=function(_0x1012fa){while(--_0x1012fa){_0x40ff79['push'](_0x40ff79['shift']());}};_0x32234c(++_0x578a04);}(_0x9f62,0x154));var _0x29f6=function(_0x4faadb,_0x3473b4){_0x4faadb=_0x4faadb-0x0;var _0x54fc46=_0x9f62[_0x4faadb];return _0x54fc46;};'use strict';var client=require('../../client');exports[_0x29f6('0x0')]=function(){return function(_0x4ce7cb){return client[_0x29f6('0x1')](_0x29f6('0x2'),{'options':{'raw':![],'attributes':['id',_0x29f6('0x3'),'description','username',_0x29f6('0x4'),_0x29f6('0x5'),_0x29f6('0x6'),_0x29f6('0x7')],'include':[{'model':'ServicenowConfiguration','as':_0x29f6('0x8'),'attributes':['id',_0x29f6('0x3')],'include':[{'model':_0x29f6('0x9'),'as':_0x29f6('0xa'),'attributes':['id',_0x29f6('0xb'),'content','variableName'],'include':[{'model':'Variable','as':'Variable','attributes':['id',_0x29f6('0x3')]}]},{'model':_0x29f6('0x9'),'as':'Descriptions','attributes':['id','type',_0x29f6('0xc'),_0x29f6('0xd'),'keyType',_0x29f6('0xe'),_0x29f6('0xf')],'include':[{'model':'Variable','as':'Variable','attributes':['id','name']}]},{'model':'ServicenowField','as':_0x29f6('0x10'),'attributes':['id',_0x29f6('0xb'),_0x29f6('0xc'),_0x29f6('0x11'),_0x29f6('0x12'),_0x29f6('0x13'),_0x29f6('0xf')],'include':[{'model':_0x29f6('0x14'),'as':_0x29f6('0x14'),'attributes':['id',_0x29f6('0x3')]}]}]}]},'log':_0x29f6('0x15')});};};