Built motion from commit (unavailable).|2.5.21
[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 _0x6d6d=['hook','events','../../mysqldb','VoiceQueue','save','update','remove','hasOwnProperty'];(function(_0x18ad19,_0x5c35a1){var _0x34d0cd=function(_0x280881){while(--_0x280881){_0x18ad19['push'](_0x18ad19['shift']());}};_0x34d0cd(++_0x5c35a1);}(_0x6d6d,0x1a1));var _0xd6d6=function(_0x5ac55b,_0xb5382b){_0x5ac55b=_0x5ac55b-0x0;var _0x2ef30c=_0x6d6d[_0x5ac55b];return _0x2ef30c;};'use strict';var EventEmitter=require(_0xd6d6('0x0'));var VoiceQueue=require(_0xd6d6('0x1'))['db'][_0xd6d6('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xd6d6('0x3'),'afterUpdate':_0xd6d6('0x4'),'afterDestroy':_0xd6d6('0x5')};function emitEvent(_0xcdbb67){return function(_0x5769f6,_0x581746,_0x8752ed){VoiceQueueEvents['emit'](_0xcdbb67+':'+_0x5769f6['id'],_0x5769f6);VoiceQueueEvents['emit'](_0xcdbb67,_0x5769f6);_0x8752ed(null);};}for(var e in events){if(events[_0xd6d6('0x6')](e)){var event=events[e];VoiceQueue[_0xd6d6('0x7')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;