Built motion from commit 1fd437e9.|2.6.19
[motion2.git] / server / api / voicePrefix / voicePrefix.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 _0xe5d9=['hook','exports','events','../../mysqldb','VoicePrefix','setMaxListeners','save','update','remove','emit'];(function(_0x47aca7,_0x146518){var _0x524aef=function(_0x3ddac1){while(--_0x3ddac1){_0x47aca7['push'](_0x47aca7['shift']());}};_0x524aef(++_0x146518);}(_0xe5d9,0x192));var _0x9e5d=function(_0x46c865,_0x154b2f){_0x46c865=_0x46c865-0x0;var _0x200973=_0xe5d9[_0x46c865];return _0x200973;};'use strict';var EventEmitter=require(_0x9e5d('0x0'));var VoicePrefix=require(_0x9e5d('0x1'))['db'][_0x9e5d('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x9e5d('0x3')](0x0);var events={'afterCreate':_0x9e5d('0x4'),'afterUpdate':_0x9e5d('0x5'),'afterDestroy':_0x9e5d('0x6')};function emitEvent(_0x1d53e2){return function(_0x187318,_0x334bf0,_0x408954){VoicePrefixEvents[_0x9e5d('0x7')](_0x1d53e2+':'+_0x187318['id'],_0x187318);VoicePrefixEvents[_0x9e5d('0x7')](_0x1d53e2,_0x187318);_0x408954(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoicePrefix[_0x9e5d('0x8')](e,emitEvent(event));}}module[_0x9e5d('0x9')]=VoicePrefixEvents;