fd86e278f569732b1c417970b703e69bd78b7114
[motion2.git] / server / services / ami / rpc / integrations / dynamics365.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 _0x4c4e=['ticketType','Dynamics365Field','Subjects','variableName','Variable','Descriptions','content','key','keyType','keyContent','Fields','idField','customField','../../client','Request','GetDynamics365Account','username','password','remoteUri','clientId','serverUrl','description','Dynamics365Configuration','Configurations','name'];(function(_0x9138a6,_0xbce9a7){var _0x241acf=function(_0xd96c5e){while(--_0xd96c5e){_0x9138a6['push'](_0x9138a6['shift']());}};_0x241acf(++_0xbce9a7);}(_0x4c4e,0x152));var _0xe4c4=function(_0x15f9a2,_0x4b42a7){_0x15f9a2=_0x15f9a2-0x0;var _0x51032c=_0x4c4e[_0x15f9a2];return _0x51032c;};'use strict';var client=require(_0xe4c4('0x0'));exports['getDynamics365Accounts']=function(){return function(_0x32f6d3){return client[_0xe4c4('0x1')](_0xe4c4('0x2'),{'options':{'raw':![],'attributes':['id','name',_0xe4c4('0x3'),_0xe4c4('0x4'),_0xe4c4('0x5'),'tenantId',_0xe4c4('0x6'),'clientSecret',_0xe4c4('0x7'),_0xe4c4('0x8')],'include':[{'model':_0xe4c4('0x9'),'as':_0xe4c4('0xa'),'attributes':['id',_0xe4c4('0xb'),_0xe4c4('0xc')],'include':[{'model':_0xe4c4('0xd'),'as':_0xe4c4('0xe'),'attributes':['id','type','content',_0xe4c4('0xf')],'include':[{'model':_0xe4c4('0x10'),'as':_0xe4c4('0x10'),'attributes':['id',_0xe4c4('0xb')]}]},{'model':_0xe4c4('0xd'),'as':_0xe4c4('0x11'),'attributes':['id','type',_0xe4c4('0x12'),_0xe4c4('0x13'),_0xe4c4('0x14'),_0xe4c4('0x15'),'variableName'],'include':[{'model':_0xe4c4('0x10'),'as':_0xe4c4('0x10'),'attributes':['id','name']}]},{'model':_0xe4c4('0xd'),'as':_0xe4c4('0x16'),'attributes':['id','type',_0xe4c4('0x12'),_0xe4c4('0x17'),'nameField',_0xe4c4('0x18'),_0xe4c4('0xf')],'include':[{'model':_0xe4c4('0x10'),'as':_0xe4c4('0x10'),'attributes':['id',_0xe4c4('0xb')]}]}]}]},'log':_0xe4c4('0x2')});};};