949674539ef59d9af19959cf1ac8bcf8bff67e51
[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 _0x95d8=['update','remove','emit','hasOwnProperty','hook','VoiceQueueReport','setMaxListeners','save'];(function(_0x2fdbbb,_0xf61a01){var _0x1cd613=function(_0x2587b2){while(--_0x2587b2){_0x2fdbbb['push'](_0x2fdbbb['shift']());}};_0x1cd613(++_0xf61a01);}(_0x95d8,0xad));var _0x895d=function(_0x1f8fbb,_0x21916d){_0x1f8fbb=_0x1f8fbb-0x0;var _0x2c99ea=_0x95d8[_0x1f8fbb];return _0x2c99ea;};'use strict';var EventEmitter=require('events');var VoiceQueueReport=require('../../mysqldb')['db'][_0x895d('0x0')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x895d('0x1')](0x0);var events={'afterCreate':_0x895d('0x2'),'afterUpdate':_0x895d('0x3'),'afterDestroy':_0x895d('0x4')};function emitEvent(_0x4c36a5){return function(_0x4376a2,_0x1285d7,_0x3252fb){VoiceQueueReportEvents['emit'](_0x4c36a5+':'+_0x4376a2['id'],_0x4376a2);VoiceQueueReportEvents[_0x895d('0x5')](_0x4c36a5,_0x4376a2);_0x3252fb(null);};}for(var e in events){if(events[_0x895d('0x6')](e)){var event=events[e];VoiceQueueReport[_0x895d('0x7')](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;