1825ef7631fbbdbcd6206013a78db9a0266662e7
[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 _0xdb70=['moduleSearch','ZohoField','Subjects','type','content','Variable','Descriptions','key','keyType','variableName','idField','customField','../../client','GetZohoAccount','name','description','host','zone','clientId','clientSecret','serverUrl','Configurations','moduleCreate'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xdb70,0x1ef));var _0x0db7=function(_0xe0ed82,_0x2a75f2){_0xe0ed82=_0xe0ed82-0x0;var _0x3da705=_0xdb70[_0xe0ed82];return _0x3da705;};'use strict';var client=require(_0x0db7('0x0'));exports['getZohoAccounts']=function(){return function(_0x3e01fb){return client['Request'](_0x0db7('0x1'),{'options':{'raw':![],'attributes':['id',_0x0db7('0x2'),_0x0db7('0x3'),_0x0db7('0x4'),_0x0db7('0x5'),_0x0db7('0x6'),_0x0db7('0x7'),_0x0db7('0x8'),'code','refreshToken'],'include':[{'model':'ZohoConfiguration','as':_0x0db7('0x9'),'attributes':['id',_0x0db7('0x2'),_0x0db7('0xa'),_0x0db7('0xb'),_0x0db7('0x3')],'include':[{'model':_0x0db7('0xc'),'as':_0x0db7('0xd'),'attributes':['id',_0x0db7('0xe'),_0x0db7('0xf'),'variableName'],'include':[{'model':_0x0db7('0x10'),'as':'Variable','attributes':['id',_0x0db7('0x2')]}]},{'model':_0x0db7('0xc'),'as':_0x0db7('0x11'),'attributes':['id',_0x0db7('0xe'),_0x0db7('0xf'),_0x0db7('0x12'),_0x0db7('0x13'),'keyContent',_0x0db7('0x14')],'include':[{'model':_0x0db7('0x10'),'as':_0x0db7('0x10'),'attributes':['id','name']}]},{'model':_0x0db7('0xc'),'as':'Fields','attributes':['id',_0x0db7('0xe'),'content',_0x0db7('0x15'),'nameField',_0x0db7('0x16'),_0x0db7('0x14')],'include':[{'model':'Variable','as':_0x0db7('0x10'),'attributes':['id','name']}]}]}]},'log':_0x0db7('0x1')});};};