efaa2e7f166240cf0665f02f876bc230e1363d36
[motion2.git] / server / api / voiceQueueReport / voiceQueueReport.events.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 _0xc700=['../../mysqldb','VoiceQueueReport','setMaxListeners','emit','hasOwnProperty','hook','exports'];(function(_0x16f53a,_0x34dc6a){var _0x543a52=function(_0x26a297){while(--_0x26a297){_0x16f53a['push'](_0x16f53a['shift']());}};_0x543a52(++_0x34dc6a);}(_0xc700,0xa1));var _0x0c70=function(_0x4022ba,_0x348126){_0x4022ba=_0x4022ba-0x0;var _0x4313d8=_0xc700[_0x4022ba];return _0x4313d8;};'use strict';var EventEmitter=require('events');var VoiceQueueReport=require(_0x0c70('0x0'))['db'][_0x0c70('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x0c70('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x2afbc0){return function(_0x13b6c5,_0x495a32,_0x288528){VoiceQueueReportEvents[_0x0c70('0x3')](_0x2afbc0+':'+_0x13b6c5['id'],_0x13b6c5);VoiceQueueReportEvents['emit'](_0x2afbc0,_0x13b6c5);_0x288528(null);};}for(var e in events){if(events[_0x0c70('0x4')](e)){var event=events[e];VoiceQueueReport[_0x0c70('0x5')](e,emitEvent(event));}}module[_0x0c70('0x6')]=VoiceQueueReportEvents;