Built motion from commit c738b9ac.|2.6.25
[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 _0xd76b=['../../mysqldb','VoicePrefix','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd76b,0x16a));var _0xbd76=function(_0x51020b,_0x38c2c7){_0x51020b=_0x51020b-0x0;var _0x371e47=_0xd76b[_0x51020b];return _0x371e47;};'use strict';var EventEmitter=require(_0xbd76('0x0'));var VoicePrefix=require(_0xbd76('0x1'))['db'][_0xbd76('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xbd76('0x3')](0x0);var events={'afterCreate':_0xbd76('0x4'),'afterUpdate':_0xbd76('0x5'),'afterDestroy':_0xbd76('0x6')};function emitEvent(_0x388a81){return function(_0x3b3eee,_0x509cff,_0x35f0f4){VoicePrefixEvents['emit'](_0x388a81+':'+_0x3b3eee['id'],_0x3b3eee);VoicePrefixEvents[_0xbd76('0x7')](_0x388a81,_0x3b3eee);_0x35f0f4(null);};}for(var e in events){if(events[_0xbd76('0x8')](e)){var event=events[e];VoicePrefix[_0xbd76('0x9')](e,emitEvent(event));}}module[_0xbd76('0xa')]=VoicePrefixEvents;