f99ab3c061e05fca7c1510733f503b735f0c4f07
[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 _0x984b=['type','content','variableName','Variable','Descriptions','key','keyType','Fields','idField','nameField','Request','GetDynamics365Account','name','remoteUri','tenantId','serverUrl','description','Configurations','Dynamics365Field'];(function(_0x28f228,_0x182029){var _0x2ea11a=function(_0x2ea60e){while(--_0x2ea60e){_0x28f228['push'](_0x28f228['shift']());}};_0x2ea11a(++_0x182029);}(_0x984b,0xee));var _0xb984=function(_0x146c14,_0x1297dd){_0x146c14=_0x146c14-0x0;var _0x150657=_0x984b[_0x146c14];return _0x150657;};'use strict';var client=require('../../client');exports['getDynamics365Accounts']=function(){return function(_0x53aeac){return client[_0xb984('0x0')](_0xb984('0x1'),{'options':{'raw':![],'attributes':['id',_0xb984('0x2'),'username','password',_0xb984('0x3'),_0xb984('0x4'),'clientId','clientSecret',_0xb984('0x5'),_0xb984('0x6')],'include':[{'model':'Dynamics365Configuration','as':_0xb984('0x7'),'attributes':['id',_0xb984('0x2'),'ticketType'],'include':[{'model':_0xb984('0x8'),'as':'Subjects','attributes':['id',_0xb984('0x9'),_0xb984('0xa'),_0xb984('0xb')],'include':[{'model':_0xb984('0xc'),'as':_0xb984('0xc'),'attributes':['id',_0xb984('0x2')]}]},{'model':_0xb984('0x8'),'as':_0xb984('0xd'),'attributes':['id',_0xb984('0x9'),_0xb984('0xa'),_0xb984('0xe'),_0xb984('0xf'),'keyContent',_0xb984('0xb')],'include':[{'model':'Variable','as':_0xb984('0xc'),'attributes':['id',_0xb984('0x2')]}]},{'model':'Dynamics365Field','as':_0xb984('0x10'),'attributes':['id',_0xb984('0x9'),'content',_0xb984('0x11'),_0xb984('0x12'),'customField',_0xb984('0xb')],'include':[{'model':_0xb984('0xc'),'as':'Variable','attributes':['id',_0xb984('0x2')]}]}]}]},'log':'GetDynamics365Account'});};};