Built motion from commit (unavailable).|2.0.74
[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 _0x119c=['save','emit','hook','events','VoiceQueue','setMaxListeners'];(function(_0x40ca0c,_0x1d3ce0){var _0x5a1c45=function(_0x195a7c){while(--_0x195a7c){_0x40ca0c['push'](_0x40ca0c['shift']());}};_0x5a1c45(++_0x1d3ce0);}(_0x119c,0xa5));var _0xc119=function(_0x357f0a,_0x37aa60){_0x357f0a=_0x357f0a-0x0;var _0x10d41b=_0x119c[_0x357f0a];return _0x10d41b;};'use strict';var EventEmitter=require(_0xc119('0x0'));var VoiceQueue=require('../../mysqldb')['db'][_0xc119('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xc119('0x2')](0x0);var events={'afterCreate':_0xc119('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x118cd7){return function(_0x471ef0,_0xa35eba,_0x11f48a){VoiceQueueEvents[_0xc119('0x4')](_0x118cd7+':'+_0x471ef0['id'],_0x471ef0);VoiceQueueEvents['emit'](_0x118cd7,_0x471ef0);_0x11f48a(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0xc119('0x5')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;