6e24b9ee89880755e56d5a968a329e3d01db8b3e
[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 _0x0295=['name','content','Variable','Descriptions','type','keyType','keyContent','variableName','idField','nameField','customField','GetServicenowkAccount','../../client','Request','description','username','password','email','remoteUri','serverUrl','ServicenowConfiguration','Configurations'];(function(_0x4ac2f2,_0x43a291){var _0x4bf328=function(_0xe61a50){while(--_0xe61a50){_0x4ac2f2['push'](_0x4ac2f2['shift']());}};_0x4bf328(++_0x43a291);}(_0x0295,0x1f0));var _0x5029=function(_0x3279a9,_0x3a966c){_0x3279a9=_0x3279a9-0x0;var _0x48bd4d=_0x0295[_0x3279a9];return _0x48bd4d;};'use strict';var client=require(_0x5029('0x0'));exports['getServicenowAccounts']=function(){return function(_0x5e71d0){return client[_0x5029('0x1')]('GetServicenowAccount',{'options':{'raw':![],'attributes':['id','name',_0x5029('0x2'),_0x5029('0x3'),_0x5029('0x4'),_0x5029('0x5'),_0x5029('0x6'),_0x5029('0x7')],'include':[{'model':_0x5029('0x8'),'as':_0x5029('0x9'),'attributes':['id',_0x5029('0xa')],'include':[{'model':'ServicenowField','as':'Subjects','attributes':['id','type',_0x5029('0xb'),'variableName'],'include':[{'model':_0x5029('0xc'),'as':'Variable','attributes':['id',_0x5029('0xa')]}]},{'model':'ServicenowField','as':_0x5029('0xd'),'attributes':['id',_0x5029('0xe'),_0x5029('0xb'),'key',_0x5029('0xf'),_0x5029('0x10'),_0x5029('0x11')],'include':[{'model':'Variable','as':_0x5029('0xc'),'attributes':['id',_0x5029('0xa')]}]},{'model':'ServicenowField','as':'Fields','attributes':['id','type','content',_0x5029('0x12'),_0x5029('0x13'),_0x5029('0x14'),_0x5029('0x11')],'include':[{'model':_0x5029('0xc'),'as':_0x5029('0xc'),'attributes':['id',_0x5029('0xa')]}]}]}]},'log':_0x5029('0x15')});};};