a50fe540479805cf6136077f1b6ed10428d39083
[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 _0x4b19=['Dynamics365Configuration','name','ticketType','Dynamics365Field','type','Variable','Descriptions','key','keyType','keyContent','variableName','content','idField','customField','../../client','Request','GetDynamics365Account','username','password','remoteUri','clientId','clientSecret','description'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0x4b19,0x195));var _0x94b1=function(_0x1675d3,_0x3516f3){_0x1675d3=_0x1675d3-0x0;var _0x5b16d7=_0x4b19[_0x1675d3];return _0x5b16d7;};'use strict';var client=require(_0x94b1('0x0'));exports['getDynamics365Accounts']=function(){return function(_0x21b11f){return client[_0x94b1('0x1')](_0x94b1('0x2'),{'options':{'raw':![],'attributes':['id','name',_0x94b1('0x3'),_0x94b1('0x4'),_0x94b1('0x5'),'tenantId',_0x94b1('0x6'),_0x94b1('0x7'),'serverUrl',_0x94b1('0x8')],'include':[{'model':_0x94b1('0x9'),'as':'Configurations','attributes':['id',_0x94b1('0xa'),_0x94b1('0xb')],'include':[{'model':_0x94b1('0xc'),'as':'Subjects','attributes':['id',_0x94b1('0xd'),'content','variableName'],'include':[{'model':_0x94b1('0xe'),'as':_0x94b1('0xe'),'attributes':['id',_0x94b1('0xa')]}]},{'model':_0x94b1('0xc'),'as':_0x94b1('0xf'),'attributes':['id',_0x94b1('0xd'),'content',_0x94b1('0x10'),_0x94b1('0x11'),_0x94b1('0x12'),_0x94b1('0x13')],'include':[{'model':'Variable','as':'Variable','attributes':['id',_0x94b1('0xa')]}]},{'model':_0x94b1('0xc'),'as':'Fields','attributes':['id','type',_0x94b1('0x14'),_0x94b1('0x15'),'nameField',_0x94b1('0x16'),'variableName'],'include':[{'model':'Variable','as':_0x94b1('0xe'),'attributes':['id',_0x94b1('0xa')]}]}]}]},'log':_0x94b1('0x2')});};};