f80a3c9a78327ee64da3bdec8b1a97f5da9e56b7
[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 _0x64ce=['save','remove','emit','hasOwnProperty','hook','events','../../mysqldb','VoiceQueueReport','setMaxListeners'];(function(_0x5050bf,_0x4edf68){var _0x499e2e=function(_0x9ee67e){while(--_0x9ee67e){_0x5050bf['push'](_0x5050bf['shift']());}};_0x499e2e(++_0x4edf68);}(_0x64ce,0x7a));var _0xe64c=function(_0x577fed,_0x415d24){_0x577fed=_0x577fed-0x0;var _0x3c79a9=_0x64ce[_0x577fed];return _0x3c79a9;};'use strict';var EventEmitter=require(_0xe64c('0x0'));var VoiceQueueReport=require(_0xe64c('0x1'))['db'][_0xe64c('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xe64c('0x3')](0x0);var events={'afterCreate':_0xe64c('0x4'),'afterUpdate':'update','afterDestroy':_0xe64c('0x5')};function emitEvent(_0x644b59){return function(_0xaa340a,_0x19dc3b,_0x335fe6){VoiceQueueReportEvents[_0xe64c('0x6')](_0x644b59+':'+_0xaa340a['id'],_0xaa340a);VoiceQueueReportEvents[_0xe64c('0x6')](_0x644b59,_0xaa340a);_0x335fe6(null);};}for(var e in events){if(events[_0xe64c('0x7')](e)){var event=events[e];VoiceQueueReport[_0xe64c('0x8')](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;