Built motion from commit (unavailable).|2.5.25
[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 _0xe082=['hasOwnProperty','hook','exports','events','../../mysqldb','VoiceExtension','save','update','remove','emit'];(function(_0x57a5aa,_0x681041){var _0x17ccc1=function(_0x2e3b05){while(--_0x2e3b05){_0x57a5aa['push'](_0x57a5aa['shift']());}};_0x17ccc1(++_0x681041);}(_0xe082,0x8f));var _0x2e08=function(_0x436849,_0x430b00){_0x436849=_0x436849-0x0;var _0x5c5f73=_0xe082[_0x436849];return _0x5c5f73;};'use strict';var EventEmitter=require(_0x2e08('0x0'));var VoiceExtension=require(_0x2e08('0x1'))['db'][_0x2e08('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x2e08('0x3'),'afterUpdate':_0x2e08('0x4'),'afterDestroy':_0x2e08('0x5')};function emitEvent(_0x40aa64){return function(_0x32d571,_0x2d696e,_0x45f87f){VoiceExtensionEvents[_0x2e08('0x6')](_0x40aa64+':'+_0x32d571['id'],_0x32d571);VoiceExtensionEvents[_0x2e08('0x6')](_0x40aa64,_0x32d571);_0x45f87f(null);};}for(var e in events){if(events[_0x2e08('0x7')](e)){var event=events[e];VoiceExtension[_0x2e08('0x8')](e,emitEvent(event));}}module[_0x2e08('0x9')]=VoiceExtensionEvents;