Built motion from commit 9d7072cc.|2.5.39
[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 _0x2730=['../../mysqldb','VoiceExtension','save','update','remove','emit','hook','exports','events'];(function(_0x5d54b4,_0x1c3431){var _0x4192c5=function(_0x2dd008){while(--_0x2dd008){_0x5d54b4['push'](_0x5d54b4['shift']());}};_0x4192c5(++_0x1c3431);}(_0x2730,0xaa));var _0x0273=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x2730[_0x17d9e3];return _0x14192d;};'use strict';var EventEmitter=require(_0x0273('0x0'));var VoiceExtension=require(_0x0273('0x1'))['db'][_0x0273('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x0273('0x3'),'afterUpdate':_0x0273('0x4'),'afterDestroy':_0x0273('0x5')};function emitEvent(_0x5ebd42){return function(_0x1c2151,_0x3031df,_0x56524c){VoiceExtensionEvents[_0x0273('0x6')](_0x5ebd42+':'+_0x1c2151['id'],_0x1c2151);VoiceExtensionEvents[_0x0273('0x6')](_0x5ebd42,_0x1c2151);_0x56524c(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension[_0x0273('0x7')](e,emitEvent(event));}}module[_0x0273('0x8')]=VoiceExtensionEvents;