d04823727bb7f1f1d665b7f6265afcbac85df4f7
[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 _0x919e=['type','content','variableName','Variable','keyContent','Fields','idField','nameField','customField','../../client','getDynamics365Accounts','GetDynamics365Account','password','remoteUri','tenantId','clientId','clientSecret','serverUrl','description','Configurations','name','Dynamics365Field'];(function(_0x38a623,_0x4d9380){var _0x46cb37=function(_0x371edf){while(--_0x371edf){_0x38a623['push'](_0x38a623['shift']());}};_0x46cb37(++_0x4d9380);}(_0x919e,0x1d7));var _0xe919=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x919e[_0x14add3];return _0x4a174f;};'use strict';var client=require(_0xe919('0x0'));exports[_0xe919('0x1')]=function(){return function(_0x24d2f4){return client['Request'](_0xe919('0x2'),{'options':{'raw':![],'attributes':['id','name','username',_0xe919('0x3'),_0xe919('0x4'),_0xe919('0x5'),_0xe919('0x6'),_0xe919('0x7'),_0xe919('0x8'),_0xe919('0x9')],'include':[{'model':'Dynamics365Configuration','as':_0xe919('0xa'),'attributes':['id',_0xe919('0xb'),'ticketType'],'include':[{'model':_0xe919('0xc'),'as':'Subjects','attributes':['id',_0xe919('0xd'),_0xe919('0xe'),_0xe919('0xf')],'include':[{'model':'Variable','as':_0xe919('0x10'),'attributes':['id',_0xe919('0xb')]}]},{'model':_0xe919('0xc'),'as':'Descriptions','attributes':['id',_0xe919('0xd'),'content','key','keyType',_0xe919('0x11'),_0xe919('0xf')],'include':[{'model':_0xe919('0x10'),'as':'Variable','attributes':['id','name']}]},{'model':_0xe919('0xc'),'as':_0xe919('0x12'),'attributes':['id','type',_0xe919('0xe'),_0xe919('0x13'),_0xe919('0x14'),_0xe919('0x15'),_0xe919('0xf')],'include':[{'model':_0xe919('0x10'),'as':_0xe919('0x10'),'attributes':['id','name']}]}]}]},'log':_0xe919('0x2')});};};