Built motion from commit (unavailable).|2.3.7
[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 _0xadb8=['VoicePrefix','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x44996b,_0x33add2){var _0x12c335=function(_0x1b3f72){while(--_0x1b3f72){_0x44996b['push'](_0x44996b['shift']());}};_0x12c335(++_0x33add2);}(_0xadb8,0x1d0));var _0x8adb=function(_0x384d39,_0xf060fc){_0x384d39=_0x384d39-0x0;var _0x13bf22=_0xadb8[_0x384d39];return _0x13bf22;};'use strict';var EventEmitter=require('events');var VoicePrefix=require('../../mysqldb')['db'][_0x8adb('0x0')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x8adb('0x1'),'afterUpdate':_0x8adb('0x2'),'afterDestroy':_0x8adb('0x3')};function emitEvent(_0x1bf88c){return function(_0x44fdf7,_0x2baedb,_0x42a86f){VoicePrefixEvents['emit'](_0x1bf88c+':'+_0x44fdf7['id'],_0x44fdf7);VoicePrefixEvents[_0x8adb('0x4')](_0x1bf88c,_0x44fdf7);_0x42a86f(null);};}for(var e in events){if(events[_0x8adb('0x5')](e)){var event=events[e];VoicePrefix[_0x8adb('0x6')](e,emitEvent(event));}}module[_0x8adb('0x7')]=VoicePrefixEvents;