7d905415b5d1d6eedf1d171308d2d8bed6edbf29
[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 _0xa0e8=['refreshToken','ZohoConfiguration','Configurations','moduleCreate','description','ZohoField','Subjects','type','content','variableName','keyType','keyContent','Variable','Fields','idField','customField','../../client','GetZohoAccount','name','clientSecret','serverUrl','code'];(function(_0x39c937,_0x24bb30){var _0x4f7d6b=function(_0x4acb4a){while(--_0x4acb4a){_0x39c937['push'](_0x39c937['shift']());}};_0x4f7d6b(++_0x24bb30);}(_0xa0e8,0x1f4));var _0x8a0e=function(_0x528963,_0x5d0273){_0x528963=_0x528963-0x0;var _0xd89f65=_0xa0e8[_0x528963];return _0xd89f65;};'use strict';var client=require(_0x8a0e('0x0'));exports['getZohoAccounts']=function(){return function(_0x15761b){return client['Request'](_0x8a0e('0x1'),{'options':{'raw':![],'attributes':['id',_0x8a0e('0x2'),'description','host','zone','clientId',_0x8a0e('0x3'),_0x8a0e('0x4'),_0x8a0e('0x5'),_0x8a0e('0x6')],'include':[{'model':_0x8a0e('0x7'),'as':_0x8a0e('0x8'),'attributes':['id',_0x8a0e('0x2'),_0x8a0e('0x9'),'moduleSearch',_0x8a0e('0xa')],'include':[{'model':_0x8a0e('0xb'),'as':_0x8a0e('0xc'),'attributes':['id',_0x8a0e('0xd'),_0x8a0e('0xe'),_0x8a0e('0xf')],'include':[{'model':'Variable','as':'Variable','attributes':['id',_0x8a0e('0x2')]}]},{'model':'ZohoField','as':'Descriptions','attributes':['id','type','content','key',_0x8a0e('0x10'),_0x8a0e('0x11'),_0x8a0e('0xf')],'include':[{'model':_0x8a0e('0x12'),'as':_0x8a0e('0x12'),'attributes':['id',_0x8a0e('0x2')]}]},{'model':_0x8a0e('0xb'),'as':_0x8a0e('0x13'),'attributes':['id','type',_0x8a0e('0xe'),_0x8a0e('0x14'),'nameField',_0x8a0e('0x15'),_0x8a0e('0xf')],'include':[{'model':_0x8a0e('0x12'),'as':'Variable','attributes':['id',_0x8a0e('0x2')]}]}]}]},'log':_0x8a0e('0x1')});};};