878bbdc35d554c19de715f7c0576680e10bd6ab9
[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 _0x4e04=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceQueueReport','setMaxListeners','save'];(function(_0x3b5250,_0x7a0b2c){var _0xc844a1=function(_0x2fbc98){while(--_0x2fbc98){_0x3b5250['push'](_0x3b5250['shift']());}};_0xc844a1(++_0x7a0b2c);}(_0x4e04,0xed));var _0x44e0=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x4e04[_0x4cf98e];return _0x1623ac;};'use strict';var EventEmitter=require(_0x44e0('0x0'));var VoiceQueueReport=require(_0x44e0('0x1'))['db'][_0x44e0('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x44e0('0x3')](0x0);var events={'afterCreate':_0x44e0('0x4'),'afterUpdate':_0x44e0('0x5'),'afterDestroy':_0x44e0('0x6')};function emitEvent(_0x188a22){return function(_0x5d5f49,_0x2f2ad2,_0x596193){VoiceQueueReportEvents[_0x44e0('0x7')](_0x188a22+':'+_0x5d5f49['id'],_0x5d5f49);VoiceQueueReportEvents[_0x44e0('0x7')](_0x188a22,_0x5d5f49);_0x596193(null);};}for(var e in events){if(events[_0x44e0('0x8')](e)){var event=events[e];VoiceQueueReport[_0x44e0('0x9')](e,emitEvent(event));}}module[_0x44e0('0xa')]=VoiceQueueReportEvents;