87e8ccbc0391ba7059ba22b0c32d27409bf264db
[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 _0xf830=['variableName','Variable','Descriptions','keyType','Fields','idField','getVtigerAccounts','GetVtigerAccount','name','username','remoteUri','serverUrl','VtigerConfiguration','Configurations','VtigerField','type'];(function(_0x38e558,_0x2937e9){var _0x2b1048=function(_0x5f23cd){while(--_0x5f23cd){_0x38e558['push'](_0x38e558['shift']());}};_0x2b1048(++_0x2937e9);}(_0xf830,0x146));var _0x0f83=function(_0x10852d,_0x4cdcc6){_0x10852d=_0x10852d-0x0;var _0x13a8d6=_0xf830[_0x10852d];return _0x13a8d6;};'use strict';var client=require('../../client');exports[_0x0f83('0x0')]=function(){return function(_0xc55515){return client['Request'](_0x0f83('0x1'),{'options':{'raw':![],'attributes':['id',_0x0f83('0x2'),'description',_0x0f83('0x3'),'accessKey',_0x0f83('0x4'),_0x0f83('0x5')],'include':[{'model':_0x0f83('0x6'),'as':_0x0f83('0x7'),'attributes':['id',_0x0f83('0x2')],'include':[{'model':_0x0f83('0x8'),'as':'Subjects','attributes':['id',_0x0f83('0x9'),'content',_0x0f83('0xa')],'include':[{'model':'Variable','as':_0x0f83('0xb'),'attributes':['id',_0x0f83('0x2')]}]},{'model':'VtigerField','as':_0x0f83('0xc'),'attributes':['id',_0x0f83('0x9'),'content','key',_0x0f83('0xd'),'keyContent','variableName'],'include':[{'model':_0x0f83('0xb'),'as':_0x0f83('0xb'),'attributes':['id','name']}]},{'model':_0x0f83('0x8'),'as':_0x0f83('0xe'),'attributes':['id','type','content',_0x0f83('0xf'),'nameField','customField',_0x0f83('0xa')],'include':[{'model':'Variable','as':_0x0f83('0xb'),'attributes':['id',_0x0f83('0x2')]}]}]}]},'log':_0x0f83('0x1')});};};