Built motion from commit (unavailable).|2.5.11
[motion2.git] / server / api / voiceExtension / voiceExtension.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 _0xac29=['hasOwnProperty','exports','events','../../mysqldb','VoiceExtension','save','update','emit'];(function(_0x2edf21,_0x4f35a2){var _0x4e6c6f=function(_0x20e42f){while(--_0x20e42f){_0x2edf21['push'](_0x2edf21['shift']());}};_0x4e6c6f(++_0x4f35a2);}(_0xac29,0xb2));var _0x9ac2=function(_0x482e1d,_0x193a27){_0x482e1d=_0x482e1d-0x0;var _0x47ca0e=_0xac29[_0x482e1d];return _0x47ca0e;};'use strict';var EventEmitter=require(_0x9ac2('0x0'));var VoiceExtension=require(_0x9ac2('0x1'))['db'][_0x9ac2('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9ac2('0x3'),'afterUpdate':_0x9ac2('0x4'),'afterDestroy':'remove'};function emitEvent(_0xd382f){return function(_0x2a9d5e,_0x55fd7f,_0x39833b){VoiceExtensionEvents['emit'](_0xd382f+':'+_0x2a9d5e['id'],_0x2a9d5e);VoiceExtensionEvents[_0x9ac2('0x5')](_0xd382f,_0x2a9d5e);_0x39833b(null);};}for(var e in events){if(events[_0x9ac2('0x6')](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module[_0x9ac2('0x7')]=VoiceExtensionEvents;