Built motion from commit 497d3d92.|2.5.43
[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 _0xcc60=['remove','emit','hasOwnProperty','hook','exports','VoiceQueueReport','setMaxListeners','update'];(function(_0x38be70,_0x1b6859){var _0x2871d6=function(_0xf73d5c){while(--_0xf73d5c){_0x38be70['push'](_0x38be70['shift']());}};_0x2871d6(++_0x1b6859);}(_0xcc60,0x1cd));var _0x0cc6=function(_0x48b2a9,_0xbb91d6){_0x48b2a9=_0x48b2a9-0x0;var _0x4a0be8=_0xcc60[_0x48b2a9];return _0x4a0be8;};'use strict';var EventEmitter=require('events');var VoiceQueueReport=require('../../mysqldb')['db'][_0x0cc6('0x0')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x0cc6('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0x0cc6('0x2'),'afterDestroy':_0x0cc6('0x3')};function emitEvent(_0xfad782){return function(_0x5f1aa7,_0x1c89e3,_0x2bc15a){VoiceQueueReportEvents[_0x0cc6('0x4')](_0xfad782+':'+_0x5f1aa7['id'],_0x5f1aa7);VoiceQueueReportEvents['emit'](_0xfad782,_0x5f1aa7);_0x2bc15a(null);};}for(var e in events){if(events[_0x0cc6('0x5')](e)){var event=events[e];VoiceQueueReport[_0x0cc6('0x6')](e,emitEvent(event));}}module[_0x0cc6('0x7')]=VoiceQueueReportEvents;