Built motion from commit (unavailable).|2.5.15
[motion2.git] / server / api / openchannelAccount / openchannelAccount.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 _0x1b2f=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelAccount','setMaxListeners','save','update','remove'];(function(_0x2d357d,_0x2a5075){var _0x17e5da=function(_0x8df515){while(--_0x8df515){_0x2d357d['push'](_0x2d357d['shift']());}};_0x17e5da(++_0x2a5075);}(_0x1b2f,0xf6));var _0xf1b2=function(_0x2ce224,_0xa5c9a7){_0x2ce224=_0x2ce224-0x0;var _0x66e092=_0x1b2f[_0x2ce224];return _0x66e092;};'use strict';var EventEmitter=require(_0xf1b2('0x0'));var OpenchannelAccount=require(_0xf1b2('0x1'))['db'][_0xf1b2('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0xf1b2('0x3')](0x0);var events={'afterCreate':_0xf1b2('0x4'),'afterUpdate':_0xf1b2('0x5'),'afterDestroy':_0xf1b2('0x6')};function emitEvent(_0x59415d){return function(_0x489ada,_0x5e8bbb,_0x3ce82e){OpenchannelAccountEvents['emit'](_0x59415d+':'+_0x489ada['id'],_0x489ada);OpenchannelAccountEvents[_0xf1b2('0x7')](_0x59415d,_0x489ada);_0x3ce82e(null);};}for(var e in events){if(events[_0xf1b2('0x8')](e)){var event=events[e];OpenchannelAccount[_0xf1b2('0x9')](e,emitEvent(event));}}module[_0xf1b2('0xa')]=OpenchannelAccountEvents;