Built motion from commit 753c950e.|2.5.42
[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 _0xdb63=['setMaxListeners','save','remove','hook','exports','../../mysqldb','VoiceExtension'];(function(_0x5e36d1,_0x471178){var _0x950b9e=function(_0x1872f3){while(--_0x1872f3){_0x5e36d1['push'](_0x5e36d1['shift']());}};_0x950b9e(++_0x471178);}(_0xdb63,0x91));var _0x3db6=function(_0x3cea2d,_0x4fa55f){_0x3cea2d=_0x3cea2d-0x0;var _0xe2dd15=_0xdb63[_0x3cea2d];return _0xe2dd15;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0x3db6('0x0'))['db'][_0x3db6('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x3db6('0x2')](0x0);var events={'afterCreate':_0x3db6('0x3'),'afterUpdate':'update','afterDestroy':_0x3db6('0x4')};function emitEvent(_0x4ab28d){return function(_0x438311,_0x3b927c,_0x104f33){VoiceExtensionEvents['emit'](_0x4ab28d+':'+_0x438311['id'],_0x438311);VoiceExtensionEvents['emit'](_0x4ab28d,_0x438311);_0x104f33(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension[_0x3db6('0x5')](e,emitEvent(event));}}module[_0x3db6('0x6')]=VoiceExtensionEvents;