1df694bfc2fa3331dfe5d95e0f902056a03d2859
[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 _0xc7f8=['username','accessKey','remoteUri','Configurations','type','content','variableName','Variable','VtigerField','Descriptions','key','idField','nameField','customField','../../client','Request','GetVtigerAccount','name','description'];(function(_0x35fbb0,_0x40effd){var _0x3794c8=function(_0x19d5ae){while(--_0x19d5ae){_0x35fbb0['push'](_0x35fbb0['shift']());}};_0x3794c8(++_0x40effd);}(_0xc7f8,0x6d));var _0x8c7f=function(_0x4fcdfe,_0x3fab1c){_0x4fcdfe=_0x4fcdfe-0x0;var _0x4e82f1=_0xc7f8[_0x4fcdfe];return _0x4e82f1;};'use strict';var client=require(_0x8c7f('0x0'));exports['getVtigerAccounts']=function(){return function(_0x50accf){return client[_0x8c7f('0x1')](_0x8c7f('0x2'),{'options':{'raw':![],'attributes':['id',_0x8c7f('0x3'),_0x8c7f('0x4'),_0x8c7f('0x5'),_0x8c7f('0x6'),_0x8c7f('0x7'),'serverUrl'],'include':[{'model':'VtigerConfiguration','as':_0x8c7f('0x8'),'attributes':['id','name'],'include':[{'model':'VtigerField','as':'Subjects','attributes':['id',_0x8c7f('0x9'),_0x8c7f('0xa'),_0x8c7f('0xb')],'include':[{'model':_0x8c7f('0xc'),'as':_0x8c7f('0xc'),'attributes':['id',_0x8c7f('0x3')]}]},{'model':_0x8c7f('0xd'),'as':_0x8c7f('0xe'),'attributes':['id',_0x8c7f('0x9'),_0x8c7f('0xa'),_0x8c7f('0xf'),'keyType','keyContent',_0x8c7f('0xb')],'include':[{'model':_0x8c7f('0xc'),'as':'Variable','attributes':['id',_0x8c7f('0x3')]}]},{'model':_0x8c7f('0xd'),'as':'Fields','attributes':['id',_0x8c7f('0x9'),_0x8c7f('0xa'),_0x8c7f('0x10'),_0x8c7f('0x11'),_0x8c7f('0x12'),_0x8c7f('0xb')],'include':[{'model':'Variable','as':_0x8c7f('0xc'),'attributes':['id',_0x8c7f('0x3')]}]}]}]},'log':_0x8c7f('0x2')});};};