bb5ba7a26a8bda9a204bf201022fb221a982b178
[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 _0x5987=['hasOwnProperty','hook','events','../../mysqldb','VoiceQueueReport','save','update','emit'];(function(_0x4f1c29,_0x3dd2fc){var _0x5dd5d2=function(_0x57cda){while(--_0x57cda){_0x4f1c29['push'](_0x4f1c29['shift']());}};_0x5dd5d2(++_0x3dd2fc);}(_0x5987,0x1e2));var _0x7598=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x5987[_0x618414];return _0x21c19a;};'use strict';var EventEmitter=require(_0x7598('0x0'));var VoiceQueueReport=require(_0x7598('0x1'))['db'][_0x7598('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7598('0x3'),'afterUpdate':_0x7598('0x4'),'afterDestroy':'remove'};function emitEvent(_0x550dbc){return function(_0x44a248,_0x1f89c5,_0x73f50b){VoiceQueueReportEvents[_0x7598('0x5')](_0x550dbc+':'+_0x44a248['id'],_0x44a248);VoiceQueueReportEvents['emit'](_0x550dbc,_0x44a248);_0x73f50b(null);};}for(var e in events){if(events[_0x7598('0x6')](e)){var event=events[e];VoiceQueueReport[_0x7598('0x7')](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;