Built motion from commit (unavailable).|2.5.22
[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 _0x12d3=['events','../../mysqldb','VoiceQueueReport','setMaxListeners','save','remove','emit','hasOwnProperty','exports'];(function(_0x4f09cf,_0x2f5ed5){var _0x5d2c01=function(_0x23d719){while(--_0x23d719){_0x4f09cf['push'](_0x4f09cf['shift']());}};_0x5d2c01(++_0x2f5ed5);}(_0x12d3,0xab));var _0x312d=function(_0xf82eb9,_0x18b78f){_0xf82eb9=_0xf82eb9-0x0;var _0x1d9e15=_0x12d3[_0xf82eb9];return _0x1d9e15;};'use strict';var EventEmitter=require(_0x312d('0x0'));var VoiceQueueReport=require(_0x312d('0x1'))['db'][_0x312d('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x312d('0x3')](0x0);var events={'afterCreate':_0x312d('0x4'),'afterUpdate':'update','afterDestroy':_0x312d('0x5')};function emitEvent(_0x187357){return function(_0x225c12,_0x522b95,_0x4c8963){VoiceQueueReportEvents[_0x312d('0x6')](_0x187357+':'+_0x225c12['id'],_0x225c12);VoiceQueueReportEvents['emit'](_0x187357,_0x225c12);_0x4c8963(null);};}for(var e in events){if(events[_0x312d('0x7')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module[_0x312d('0x8')]=VoiceQueueReportEvents;