73be0d2a0a432c1fa090e8769ce5b4e42db8368c
[motion2.git] / server / services / ami / rpc / integrations / zoho.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 _0x1841=['moduleSearch','type','content','variableName','Variable','ZohoField','Descriptions','keyType','nameField','../../client','getZohoAccounts','Request','GetZohoAccount','name','description','zone','clientId','clientSecret','refreshToken','ZohoConfiguration'];(function(_0x525c7b,_0x488fcc){var _0x27b33e=function(_0x56d43b){while(--_0x56d43b){_0x525c7b['push'](_0x525c7b['shift']());}};_0x27b33e(++_0x488fcc);}(_0x1841,0xbd));var _0x1184=function(_0x5e2d7a,_0xce67c0){_0x5e2d7a=_0x5e2d7a-0x0;var _0x301d92=_0x1841[_0x5e2d7a];return _0x301d92;};'use strict';var client=require(_0x1184('0x0'));exports[_0x1184('0x1')]=function(){return function(_0x112ff9){return client[_0x1184('0x2')](_0x1184('0x3'),{'options':{'raw':![],'attributes':['id',_0x1184('0x4'),_0x1184('0x5'),'host',_0x1184('0x6'),_0x1184('0x7'),_0x1184('0x8'),'serverUrl','code',_0x1184('0x9')],'include':[{'model':_0x1184('0xa'),'as':'Configurations','attributes':['id','name','moduleCreate',_0x1184('0xb'),'description'],'include':[{'model':'ZohoField','as':'Subjects','attributes':['id',_0x1184('0xc'),_0x1184('0xd'),_0x1184('0xe')],'include':[{'model':_0x1184('0xf'),'as':_0x1184('0xf'),'attributes':['id',_0x1184('0x4')]}]},{'model':_0x1184('0x10'),'as':_0x1184('0x11'),'attributes':['id',_0x1184('0xc'),_0x1184('0xd'),'key',_0x1184('0x12'),'keyContent',_0x1184('0xe')],'include':[{'model':_0x1184('0xf'),'as':_0x1184('0xf'),'attributes':['id',_0x1184('0x4')]}]},{'model':_0x1184('0x10'),'as':'Fields','attributes':['id','type','content','idField',_0x1184('0x13'),'customField','variableName'],'include':[{'model':'Variable','as':_0x1184('0xf'),'attributes':['id',_0x1184('0x4')]}]}]}]},'log':_0x1184('0x3')});};};