f2840e98621be678a8665ff4943f2cd9c042ce31
[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 _0xa027=['keyContent','variableName','ZohoField','Fields','idField','customField','GetZohoAccount','../../client','Request','description','host','zone','clientId','clientSecret','serverUrl','code','Configurations','name','moduleCreate','moduleSearch','type','content','Variable','Descriptions','key'];(function(_0x14f748,_0x196b37){var _0x2f4711=function(_0x19834d){while(--_0x19834d){_0x14f748['push'](_0x14f748['shift']());}};_0x2f4711(++_0x196b37);}(_0xa027,0x6b));var _0x7a02=function(_0x449512,_0x262351){_0x449512=_0x449512-0x0;var _0x110ff3=_0xa027[_0x449512];return _0x110ff3;};'use strict';var client=require(_0x7a02('0x0'));exports['getZohoAccounts']=function(){return function(_0x41b357){return client[_0x7a02('0x1')]('GetZohoAccount',{'options':{'raw':![],'attributes':['id','name',_0x7a02('0x2'),_0x7a02('0x3'),_0x7a02('0x4'),_0x7a02('0x5'),_0x7a02('0x6'),_0x7a02('0x7'),_0x7a02('0x8'),'refreshToken'],'include':[{'model':'ZohoConfiguration','as':_0x7a02('0x9'),'attributes':['id',_0x7a02('0xa'),_0x7a02('0xb'),_0x7a02('0xc'),_0x7a02('0x2')],'include':[{'model':'ZohoField','as':'Subjects','attributes':['id',_0x7a02('0xd'),_0x7a02('0xe'),'variableName'],'include':[{'model':_0x7a02('0xf'),'as':_0x7a02('0xf'),'attributes':['id',_0x7a02('0xa')]}]},{'model':'ZohoField','as':_0x7a02('0x10'),'attributes':['id',_0x7a02('0xd'),'content',_0x7a02('0x11'),'keyType',_0x7a02('0x12'),_0x7a02('0x13')],'include':[{'model':'Variable','as':_0x7a02('0xf'),'attributes':['id',_0x7a02('0xa')]}]},{'model':_0x7a02('0x14'),'as':_0x7a02('0x15'),'attributes':['id',_0x7a02('0xd'),_0x7a02('0xe'),_0x7a02('0x16'),'nameField',_0x7a02('0x17'),_0x7a02('0x13')],'include':[{'model':_0x7a02('0xf'),'as':'Variable','attributes':['id',_0x7a02('0xa')]}]}]}]},'log':_0x7a02('0x18')});};};