Built motion from commit (unavailable).|2.5.29
[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 _0x50bc=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb'];(function(_0x24050c,_0x121282){var _0xe7e129=function(_0x54cf7f){while(--_0x54cf7f){_0x24050c['push'](_0x24050c['shift']());}};_0xe7e129(++_0x121282);}(_0x50bc,0x1a5));var _0xc50b=function(_0x1f7634,_0x4f61f7){_0x1f7634=_0x1f7634-0x0;var _0xf3051b=_0x50bc[_0x1f7634];return _0xf3051b;};'use strict';var EventEmitter=require(_0xc50b('0x0'));var VoiceExtension=require(_0xc50b('0x1'))['db']['VoiceExtension'];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xc50b('0x2')](0x0);var events={'afterCreate':_0xc50b('0x3'),'afterUpdate':_0xc50b('0x4'),'afterDestroy':_0xc50b('0x5')};function emitEvent(_0x14e15f){return function(_0x6c5b39,_0x32f77c,_0xcea62c){VoiceExtensionEvents['emit'](_0x14e15f+':'+_0x6c5b39['id'],_0x6c5b39);VoiceExtensionEvents[_0xc50b('0x6')](_0x14e15f,_0x6c5b39);_0xcea62c(null);};}for(var e in events){if(events[_0xc50b('0x7')](e)){var event=events[e];VoiceExtension[_0xc50b('0x8')](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;