Built motion from commit (unavailable).|2.4.4
[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 _0x008c=['save','remove','emit','hasOwnProperty','hook','events','../../mysqldb','VoiceExtension','setMaxListeners'];(function(_0x11f137,_0x50cc0a){var _0x2b304a=function(_0xa4ab02){while(--_0xa4ab02){_0x11f137['push'](_0x11f137['shift']());}};_0x2b304a(++_0x50cc0a);}(_0x008c,0x188));var _0xc008=function(_0x1e0c0e,_0x5ccb80){_0x1e0c0e=_0x1e0c0e-0x0;var _0x53fecc=_0x008c[_0x1e0c0e];return _0x53fecc;};'use strict';var EventEmitter=require(_0xc008('0x0'));var VoiceExtension=require(_0xc008('0x1'))['db'][_0xc008('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xc008('0x3')](0x0);var events={'afterCreate':_0xc008('0x4'),'afterUpdate':'update','afterDestroy':_0xc008('0x5')};function emitEvent(_0x47063f){return function(_0x10b33c,_0x163bd9,_0x1cbe76){VoiceExtensionEvents[_0xc008('0x6')](_0x47063f+':'+_0x10b33c['id'],_0x10b33c);VoiceExtensionEvents[_0xc008('0x6')](_0x47063f,_0x10b33c);_0x1cbe76(null);};}for(var e in events){if(events[_0xc008('0x7')](e)){var event=events[e];VoiceExtension[_0xc008('0x8')](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;