Built motion from commit (unavailable).|2.5.28
[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 _0x23aa=['setMaxListeners','save','update','remove','emit','hasOwnProperty','exports','events','../../mysqldb','VoiceExtension'];(function(_0x50fda9,_0x5ee44b){var _0x36b92b=function(_0x121877){while(--_0x121877){_0x50fda9['push'](_0x50fda9['shift']());}};_0x36b92b(++_0x5ee44b);}(_0x23aa,0xcf));var _0xa23a=function(_0x15b3fe,_0x5644be){_0x15b3fe=_0x15b3fe-0x0;var _0x568814=_0x23aa[_0x15b3fe];return _0x568814;};'use strict';var EventEmitter=require(_0xa23a('0x0'));var VoiceExtension=require(_0xa23a('0x1'))['db'][_0xa23a('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xa23a('0x3')](0x0);var events={'afterCreate':_0xa23a('0x4'),'afterUpdate':_0xa23a('0x5'),'afterDestroy':_0xa23a('0x6')};function emitEvent(_0xcf6d3){return function(_0x107709,_0x16f06b,_0x273a3b){VoiceExtensionEvents[_0xa23a('0x7')](_0xcf6d3+':'+_0x107709['id'],_0x107709);VoiceExtensionEvents[_0xa23a('0x7')](_0xcf6d3,_0x107709);_0x273a3b(null);};}for(var e in events){if(events[_0xa23a('0x8')](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module[_0xa23a('0x9')]=VoiceExtensionEvents;