7c2139cfb54d69978301ee793047cad08d7e6746
[motion2.git] / server / services / ami / rpc / integrations / vtiger.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 _0xc601=['type','content','keyContent','variableName','Fields','idField','customField','../../client','Request','GetVtigerAccount','name','description','username','remoteUri','serverUrl','VtigerConfiguration','Configurations','VtigerField','Variable','Descriptions'];(function(_0x55bcee,_0x4c64dd){var _0x4756f5=function(_0x33614f){while(--_0x33614f){_0x55bcee['push'](_0x55bcee['shift']());}};_0x4756f5(++_0x4c64dd);}(_0xc601,0x10b));var _0x1c60=function(_0x339e13,_0x48d058){_0x339e13=_0x339e13-0x0;var _0x1d8c18=_0xc601[_0x339e13];return _0x1d8c18;};'use strict';var client=require(_0x1c60('0x0'));exports['getVtigerAccounts']=function(){return function(_0x32c0d5){return client[_0x1c60('0x1')](_0x1c60('0x2'),{'options':{'raw':![],'attributes':['id',_0x1c60('0x3'),_0x1c60('0x4'),_0x1c60('0x5'),'accessKey',_0x1c60('0x6'),_0x1c60('0x7')],'include':[{'model':_0x1c60('0x8'),'as':_0x1c60('0x9'),'attributes':['id',_0x1c60('0x3')],'include':[{'model':_0x1c60('0xa'),'as':'Subjects','attributes':['id','type','content','variableName'],'include':[{'model':_0x1c60('0xb'),'as':_0x1c60('0xb'),'attributes':['id','name']}]},{'model':_0x1c60('0xa'),'as':_0x1c60('0xc'),'attributes':['id',_0x1c60('0xd'),_0x1c60('0xe'),'key','keyType',_0x1c60('0xf'),_0x1c60('0x10')],'include':[{'model':_0x1c60('0xb'),'as':'Variable','attributes':['id',_0x1c60('0x3')]}]},{'model':_0x1c60('0xa'),'as':_0x1c60('0x11'),'attributes':['id',_0x1c60('0xd'),_0x1c60('0xe'),_0x1c60('0x12'),'nameField',_0x1c60('0x13'),_0x1c60('0x10')],'include':[{'model':'Variable','as':_0x1c60('0xb'),'attributes':['id','name']}]}]}]},'log':_0x1c60('0x2')});};};