c4f2e759e015c059a54d9f53af5825ddd75a55b4
[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 _0xc14d=['hook','exports','VoiceQueueReport','setMaxListeners','save','update','remove'];(function(_0x34bc94,_0x74f0fd){var _0xee41e7=function(_0x424111){while(--_0x424111){_0x34bc94['push'](_0x34bc94['shift']());}};_0xee41e7(++_0x74f0fd);}(_0xc14d,0x11a));var _0xdc14=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xc14d[_0x14add3];return _0x4a174f;};'use strict';var EventEmitter=require('events');var VoiceQueueReport=require('../../mysqldb')['db'][_0xdc14('0x0')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xdc14('0x1')](0x0);var events={'afterCreate':_0xdc14('0x2'),'afterUpdate':_0xdc14('0x3'),'afterDestroy':_0xdc14('0x4')};function emitEvent(_0xfd90e1){return function(_0x2ab4e6,_0x1e40b3,_0x1cb2a8){VoiceQueueReportEvents['emit'](_0xfd90e1+':'+_0x2ab4e6['id'],_0x2ab4e6);VoiceQueueReportEvents['emit'](_0xfd90e1,_0x2ab4e6);_0x1cb2a8(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0xdc14('0x5')](e,emitEvent(event));}}module[_0xdc14('0x6')]=VoiceQueueReportEvents;