Built motion from commit f0b1811d.|2.6.6
[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 _0xf267=['remove','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceQueueReport','setMaxListeners','save','update'];(function(_0x38abda,_0xabd6b5){var _0x47c7e2=function(_0x2a8789){while(--_0x2a8789){_0x38abda['push'](_0x38abda['shift']());}};_0x47c7e2(++_0xabd6b5);}(_0xf267,0x1da));var _0x7f26=function(_0x4960d6,_0x36b224){_0x4960d6=_0x4960d6-0x0;var _0x4d23f9=_0xf267[_0x4960d6];return _0x4d23f9;};'use strict';var EventEmitter=require(_0x7f26('0x0'));var VoiceQueueReport=require(_0x7f26('0x1'))['db'][_0x7f26('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x7f26('0x3')](0x0);var events={'afterCreate':_0x7f26('0x4'),'afterUpdate':_0x7f26('0x5'),'afterDestroy':_0x7f26('0x6')};function emitEvent(_0x5e0d91){return function(_0x3f1e77,_0x4b3ea4,_0x54a594){VoiceQueueReportEvents['emit'](_0x5e0d91+':'+_0x3f1e77['id'],_0x3f1e77);VoiceQueueReportEvents['emit'](_0x5e0d91,_0x3f1e77);_0x54a594(null);};}for(var e in events){if(events[_0x7f26('0x7')](e)){var event=events[e];VoiceQueueReport[_0x7f26('0x8')](e,emitEvent(event));}}module[_0x7f26('0x9')]=VoiceQueueReportEvents;