Built motion from commit (unavailable).|2.3.1
[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 _0x0faf=['update','remove','emit','hasOwnProperty','hook','exports','events','VoicePrefix','setMaxListeners','save'];(function(_0x2fa7d8,_0x1f8dd7){var _0x2fbecf=function(_0x1c3171){while(--_0x1c3171){_0x2fa7d8['push'](_0x2fa7d8['shift']());}};_0x2fbecf(++_0x1f8dd7);}(_0x0faf,0x132));var _0xf0fa=function(_0x75f869,_0x3690d6){_0x75f869=_0x75f869-0x0;var _0x10af8b=_0x0faf[_0x75f869];return _0x10af8b;};'use strict';var EventEmitter=require(_0xf0fa('0x0'));var VoicePrefix=require('../../mysqldb')['db'][_0xf0fa('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xf0fa('0x2')](0x0);var events={'afterCreate':_0xf0fa('0x3'),'afterUpdate':_0xf0fa('0x4'),'afterDestroy':_0xf0fa('0x5')};function emitEvent(_0xdc9ce3){return function(_0x515b12,_0xc83253,_0x283f04){VoicePrefixEvents['emit'](_0xdc9ce3+':'+_0x515b12['id'],_0x515b12);VoicePrefixEvents[_0xf0fa('0x6')](_0xdc9ce3,_0x515b12);_0x283f04(null);};}for(var e in events){if(events[_0xf0fa('0x7')](e)){var event=events[e];VoicePrefix[_0xf0fa('0x8')](e,emitEvent(event));}}module[_0xf0fa('0x9')]=VoicePrefixEvents;