Built motion from commit efa66e19.|2.6.22
[motion2.git] / server / api / voiceExtension / voiceExtension.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 _0x3583=['../../mysqldb','VoiceExtension','setMaxListeners','save','emit','hasOwnProperty','events'];(function(_0x2b8592,_0x6c97a3){var _0x46b04d=function(_0x561246){while(--_0x561246){_0x2b8592['push'](_0x2b8592['shift']());}};_0x46b04d(++_0x6c97a3);}(_0x3583,0x12c));var _0x3358=function(_0x45cce0,_0x48030d){_0x45cce0=_0x45cce0-0x0;var _0x28452e=_0x3583[_0x45cce0];return _0x28452e;};'use strict';var EventEmitter=require(_0x3358('0x0'));var VoiceExtension=require(_0x3358('0x1'))['db'][_0x3358('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x3358('0x3')](0x0);var events={'afterCreate':_0x3358('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x4927da){return function(_0x13f7ff,_0xeb5ed6,_0x2b0bea){VoiceExtensionEvents[_0x3358('0x5')](_0x4927da+':'+_0x13f7ff['id'],_0x13f7ff);VoiceExtensionEvents['emit'](_0x4927da,_0x13f7ff);_0x2b0bea(null);};}for(var e in events){if(events[_0x3358('0x6')](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;