Built motion from commit 9d0783e6.|2.6.13
[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 _0x01bc=['save','update','remove','emit','hasOwnProperty','exports','events','../../mysqldb','VoicePrefix','setMaxListeners'];(function(_0x173e65,_0x24a8bf){var _0x37d496=function(_0x34b441){while(--_0x34b441){_0x173e65['push'](_0x173e65['shift']());}};_0x37d496(++_0x24a8bf);}(_0x01bc,0x178));var _0xc01b=function(_0x57c85c,_0xf2370c){_0x57c85c=_0x57c85c-0x0;var _0x4a5451=_0x01bc[_0x57c85c];return _0x4a5451;};'use strict';var EventEmitter=require(_0xc01b('0x0'));var VoicePrefix=require(_0xc01b('0x1'))['db'][_0xc01b('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xc01b('0x3')](0x0);var events={'afterCreate':_0xc01b('0x4'),'afterUpdate':_0xc01b('0x5'),'afterDestroy':_0xc01b('0x6')};function emitEvent(_0x2b33c6){return function(_0x56a408,_0x3fba6d,_0x4e0d8b){VoicePrefixEvents[_0xc01b('0x7')](_0x2b33c6+':'+_0x56a408['id'],_0x56a408);VoicePrefixEvents[_0xc01b('0x7')](_0x2b33c6,_0x56a408);_0x4e0d8b(null);};}for(var e in events){if(events[_0xc01b('0x8')](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module[_0xc01b('0x9')]=VoicePrefixEvents;