fbd8075ee0d5072b06232c95b7e56c0e0928e4b0
[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 _0xe107=['Fields','idField','nameField','../../client','Request','GetDynamics365Account','username','tenantId','clientId','clientSecret','Dynamics365Configuration','Configurations','name','ticketType','type','Variable','Dynamics365Field','Descriptions','content','keyType','keyContent','variableName'];(function(_0x2aea9e,_0x1f587f){var _0x430b92=function(_0x416c37){while(--_0x416c37){_0x2aea9e['push'](_0x2aea9e['shift']());}};_0x430b92(++_0x1f587f);}(_0xe107,0xb3));var _0x7e10=function(_0x223a11,_0x4ba13e){_0x223a11=_0x223a11-0x0;var _0x14857b=_0xe107[_0x223a11];return _0x14857b;};'use strict';var client=require(_0x7e10('0x0'));exports['getDynamics365Accounts']=function(){return function(_0x2ae2a8){return client[_0x7e10('0x1')](_0x7e10('0x2'),{'options':{'raw':![],'attributes':['id','name',_0x7e10('0x3'),'password','remoteUri',_0x7e10('0x4'),_0x7e10('0x5'),_0x7e10('0x6'),'serverUrl','description'],'include':[{'model':_0x7e10('0x7'),'as':_0x7e10('0x8'),'attributes':['id',_0x7e10('0x9'),_0x7e10('0xa')],'include':[{'model':'Dynamics365Field','as':'Subjects','attributes':['id',_0x7e10('0xb'),'content','variableName'],'include':[{'model':_0x7e10('0xc'),'as':_0x7e10('0xc'),'attributes':['id',_0x7e10('0x9')]}]},{'model':_0x7e10('0xd'),'as':_0x7e10('0xe'),'attributes':['id','type',_0x7e10('0xf'),'key',_0x7e10('0x10'),_0x7e10('0x11'),_0x7e10('0x12')],'include':[{'model':'Variable','as':_0x7e10('0xc'),'attributes':['id',_0x7e10('0x9')]}]},{'model':_0x7e10('0xd'),'as':_0x7e10('0x13'),'attributes':['id',_0x7e10('0xb'),_0x7e10('0xf'),_0x7e10('0x14'),_0x7e10('0x15'),'customField',_0x7e10('0x12')],'include':[{'model':_0x7e10('0xc'),'as':'Variable','attributes':['id','name']}]}]}]},'log':_0x7e10('0x2')});};};