Built motion from commit (unavailable).|2.5.5
[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 _0x9df6=['hasOwnProperty','exports','../../mysqldb','VoiceExtension','save','update','remove','emit'];(function(_0x440677,_0x19f5a5){var _0x897b85=function(_0x5e951a){while(--_0x5e951a){_0x440677['push'](_0x440677['shift']());}};_0x897b85(++_0x19f5a5);}(_0x9df6,0xe2));var _0x69df=function(_0x49ca18,_0x5e6d05){_0x49ca18=_0x49ca18-0x0;var _0x145d54=_0x9df6[_0x49ca18];return _0x145d54;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0x69df('0x0'))['db'][_0x69df('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x69df('0x2'),'afterUpdate':_0x69df('0x3'),'afterDestroy':_0x69df('0x4')};function emitEvent(_0x8ac918){return function(_0x56648b,_0x42f641,_0x14635b){VoiceExtensionEvents[_0x69df('0x5')](_0x8ac918+':'+_0x56648b['id'],_0x56648b);VoiceExtensionEvents[_0x69df('0x5')](_0x8ac918,_0x56648b);_0x14635b(null);};}for(var e in events){if(events[_0x69df('0x6')](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module[_0x69df('0x7')]=VoiceExtensionEvents;