Built motion from commit a679711e.|2.6.15
[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 _0x4c79=['save','update','remove','emit','hook','exports','events','../../mysqldb','VoicePrefix','setMaxListeners'];(function(_0x31cb5f,_0x2df766){var _0x586042=function(_0x53c807){while(--_0x53c807){_0x31cb5f['push'](_0x31cb5f['shift']());}};_0x586042(++_0x2df766);}(_0x4c79,0xc4));var _0x94c7=function(_0x37a3e0,_0x216b86){_0x37a3e0=_0x37a3e0-0x0;var _0x30ce1d=_0x4c79[_0x37a3e0];return _0x30ce1d;};'use strict';var EventEmitter=require(_0x94c7('0x0'));var VoicePrefix=require(_0x94c7('0x1'))['db'][_0x94c7('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x94c7('0x3')](0x0);var events={'afterCreate':_0x94c7('0x4'),'afterUpdate':_0x94c7('0x5'),'afterDestroy':_0x94c7('0x6')};function emitEvent(_0x3da903){return function(_0x36ba31,_0x5c0443,_0x5656dc){VoicePrefixEvents['emit'](_0x3da903+':'+_0x36ba31['id'],_0x36ba31);VoicePrefixEvents[_0x94c7('0x7')](_0x3da903,_0x36ba31);_0x5656dc(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoicePrefix[_0x94c7('0x8')](e,emitEvent(event));}}module[_0x94c7('0x9')]=VoicePrefixEvents;