414cc63668fc92e03de2e347668acf8c14cfafef
[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 _0xb25f=['Request','GetVtigerAccount','name','username','accessKey','serverUrl','VtigerConfiguration','Configurations','VtigerField','variableName','Variable','Descriptions','type','content','keyContent','Fields','customField','../../client'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xb25f,0x1e5));var _0xfb25=function(_0xdef0d3,_0x537a32){_0xdef0d3=_0xdef0d3-0x0;var _0x4c436b=_0xb25f[_0xdef0d3];return _0x4c436b;};'use strict';var client=require(_0xfb25('0x0'));exports['getVtigerAccounts']=function(){return function(_0x3190c5){return client[_0xfb25('0x1')](_0xfb25('0x2'),{'options':{'raw':![],'attributes':['id',_0xfb25('0x3'),'description',_0xfb25('0x4'),_0xfb25('0x5'),'remoteUri',_0xfb25('0x6')],'include':[{'model':_0xfb25('0x7'),'as':_0xfb25('0x8'),'attributes':['id',_0xfb25('0x3')],'include':[{'model':_0xfb25('0x9'),'as':'Subjects','attributes':['id','type','content',_0xfb25('0xa')],'include':[{'model':_0xfb25('0xb'),'as':'Variable','attributes':['id',_0xfb25('0x3')]}]},{'model':_0xfb25('0x9'),'as':_0xfb25('0xc'),'attributes':['id',_0xfb25('0xd'),_0xfb25('0xe'),'key','keyType',_0xfb25('0xf'),'variableName'],'include':[{'model':_0xfb25('0xb'),'as':'Variable','attributes':['id',_0xfb25('0x3')]}]},{'model':_0xfb25('0x9'),'as':_0xfb25('0x10'),'attributes':['id',_0xfb25('0xd'),_0xfb25('0xe'),'idField','nameField',_0xfb25('0x11'),_0xfb25('0xa')],'include':[{'model':_0xfb25('0xb'),'as':_0xfb25('0xb'),'attributes':['id','name']}]}]}]},'log':_0xfb25('0x2')});};};