e2c22d26d55e12534008675575f82215e91ffadd
[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 _0x8196=['type','content','key','keyType','keyContent','Fields','idField','nameField','../../client','Request','GetVtigerAccount','name','description','accessKey','remoteUri','serverUrl','VtigerConfiguration','Configurations','VtigerField','Subjects','variableName','Variable','Descriptions'];(function(_0x4be603,_0x428c51){var _0x4cf205=function(_0x29d474){while(--_0x29d474){_0x4be603['push'](_0x4be603['shift']());}};_0x4cf205(++_0x428c51);}(_0x8196,0x14a));var _0x6819=function(_0x24ec42,_0x14d3d8){_0x24ec42=_0x24ec42-0x0;var _0x3edacd=_0x8196[_0x24ec42];return _0x3edacd;};'use strict';var client=require(_0x6819('0x0'));exports['getVtigerAccounts']=function(){return function(_0x72764d){return client[_0x6819('0x1')](_0x6819('0x2'),{'options':{'raw':![],'attributes':['id',_0x6819('0x3'),_0x6819('0x4'),'username',_0x6819('0x5'),_0x6819('0x6'),_0x6819('0x7')],'include':[{'model':_0x6819('0x8'),'as':_0x6819('0x9'),'attributes':['id',_0x6819('0x3')],'include':[{'model':_0x6819('0xa'),'as':_0x6819('0xb'),'attributes':['id','type','content',_0x6819('0xc')],'include':[{'model':_0x6819('0xd'),'as':'Variable','attributes':['id',_0x6819('0x3')]}]},{'model':'VtigerField','as':_0x6819('0xe'),'attributes':['id',_0x6819('0xf'),_0x6819('0x10'),_0x6819('0x11'),_0x6819('0x12'),_0x6819('0x13'),'variableName'],'include':[{'model':_0x6819('0xd'),'as':_0x6819('0xd'),'attributes':['id','name']}]},{'model':_0x6819('0xa'),'as':_0x6819('0x14'),'attributes':['id',_0x6819('0xf'),'content',_0x6819('0x15'),_0x6819('0x16'),'customField',_0x6819('0xc')],'include':[{'model':'Variable','as':_0x6819('0xd'),'attributes':['id',_0x6819('0x3')]}]}]}]},'log':_0x6819('0x2')});};};