Built motion from commit (unavailable).|2.5.0
[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 _0xf56c=['events','../../mysqldb','VoiceExtension','setMaxListeners','remove','emit','hasOwnProperty','hook','exports'];(function(_0x29d94e,_0xf386d6){var _0x106237=function(_0x327501){while(--_0x327501){_0x29d94e['push'](_0x29d94e['shift']());}};_0x106237(++_0xf386d6);}(_0xf56c,0x90));var _0xcf56=function(_0x2c93b7,_0x465f4d){_0x2c93b7=_0x2c93b7-0x0;var _0x52dafd=_0xf56c[_0x2c93b7];return _0x52dafd;};'use strict';var EventEmitter=require(_0xcf56('0x0'));var VoiceExtension=require(_0xcf56('0x1'))['db'][_0xcf56('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xcf56('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xcf56('0x4')};function emitEvent(_0x4a0541){return function(_0x1995dc,_0x517bd4,_0x36688b){VoiceExtensionEvents[_0xcf56('0x5')](_0x4a0541+':'+_0x1995dc['id'],_0x1995dc);VoiceExtensionEvents[_0xcf56('0x5')](_0x4a0541,_0x1995dc);_0x36688b(null);};}for(var e in events){if(events[_0xcf56('0x6')](e)){var event=events[e];VoiceExtension[_0xcf56('0x7')](e,emitEvent(event));}}module[_0xcf56('0x8')]=VoiceExtensionEvents;