8bb01ebe9de2491b54732e6fa84f312365df6f47
[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 _0xc6a1=['Configurations','VtigerField','content','Variable','Descriptions','key','keyType','Fields','type','idField','nameField','variableName','Request','GetVtigerAccount','name','accessKey','serverUrl','VtigerConfiguration'];(function(_0x37d0da,_0x17ba11){var _0x76a321=function(_0x5b4e55){while(--_0x5b4e55){_0x37d0da['push'](_0x37d0da['shift']());}};_0x76a321(++_0x17ba11);}(_0xc6a1,0x1bc));var _0x1c6a=function(_0x27af45,_0x1b57aa){_0x27af45=_0x27af45-0x0;var _0x18df21=_0xc6a1[_0x27af45];return _0x18df21;};'use strict';var client=require('../../client');exports['getVtigerAccounts']=function(){return function(_0x11214f){return client[_0x1c6a('0x0')](_0x1c6a('0x1'),{'options':{'raw':![],'attributes':['id',_0x1c6a('0x2'),'description','username',_0x1c6a('0x3'),'remoteUri',_0x1c6a('0x4')],'include':[{'model':_0x1c6a('0x5'),'as':_0x1c6a('0x6'),'attributes':['id','name'],'include':[{'model':_0x1c6a('0x7'),'as':'Subjects','attributes':['id','type',_0x1c6a('0x8'),'variableName'],'include':[{'model':_0x1c6a('0x9'),'as':_0x1c6a('0x9'),'attributes':['id','name']}]},{'model':'VtigerField','as':_0x1c6a('0xa'),'attributes':['id','type','content',_0x1c6a('0xb'),_0x1c6a('0xc'),'keyContent','variableName'],'include':[{'model':_0x1c6a('0x9'),'as':_0x1c6a('0x9'),'attributes':['id',_0x1c6a('0x2')]}]},{'model':_0x1c6a('0x7'),'as':_0x1c6a('0xd'),'attributes':['id',_0x1c6a('0xe'),'content',_0x1c6a('0xf'),_0x1c6a('0x10'),'customField',_0x1c6a('0x11')],'include':[{'model':_0x1c6a('0x9'),'as':_0x1c6a('0x9'),'attributes':['id',_0x1c6a('0x2')]}]}]}]},'log':'GetVtigerAccount'});};};