Built motion from commit (unavailable).|2.4.18
[motion2.git] / server / api / voiceQueue / voiceQueue.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 _0x5537=['save','emit','events','../../mysqldb','VoiceQueue','setMaxListeners'];(function(_0x255fe6,_0x49d7cf){var _0x42051c=function(_0x468866){while(--_0x468866){_0x255fe6['push'](_0x255fe6['shift']());}};_0x42051c(++_0x49d7cf);}(_0x5537,0x12e));var _0x7553=function(_0x4dd1b3,_0x4ec057){_0x4dd1b3=_0x4dd1b3-0x0;var _0x3495af=_0x5537[_0x4dd1b3];return _0x3495af;};'use strict';var EventEmitter=require(_0x7553('0x0'));var VoiceQueue=require(_0x7553('0x1'))['db'][_0x7553('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x7553('0x3')](0x0);var events={'afterCreate':_0x7553('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x4f96cb){return function(_0x47cd81,_0x1a47b1,_0x24f62f){VoiceQueueEvents['emit'](_0x4f96cb+':'+_0x47cd81['id'],_0x47cd81);VoiceQueueEvents[_0x7553('0x5')](_0x4f96cb,_0x47cd81);_0x24f62f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;