b1312b8031dbaa04b5f42d1818a5994a0001b6de
[motion2.git] / server / services / ami / trigger / script / index.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 _0x68ef=['data3','error','format','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','info','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','util','shelljs','mustache','../../../../config/logger','exec','data2','Script'];(function(_0x7410ec,_0x2dd010){var _0x399d42=function(_0x37fddf){while(--_0x37fddf){_0x7410ec['push'](_0x7410ec['shift']());}};_0x399d42(++_0x2dd010);}(_0x68ef,0x1da));var _0xf68e=function(_0x41fd48,_0x5ca869){_0x41fd48=_0x41fd48-0x0;var _0x1dcf5b=_0x68ef[_0x41fd48];return _0x1dcf5b;};'use strict';var util=require(_0xf68e('0x0'));var sh=require(_0xf68e('0x1'));var Mustache=require(_0xf68e('0x2'));var logger=require(_0xf68e('0x3'))('trigger');exports[_0xf68e('0x4')]=function(_0x7b7951,_0x20f8f6){var _0x31e712=_0x7b7951[_0xf68e('0x5')]?_0x7b7951[_0xf68e('0x5')]:_0xf68e('0x6');var _0x57efc8=_0x7b7951['data3']?Mustache['render'](_0x7b7951[_0xf68e('0x7')],_0x20f8f6):_0x20f8f6;sh[_0xf68e('0x4')](_0x57efc8,function(_0x5bf07c,_0x32156d,_0x4bd6aa){if(_0x5bf07c!==0x0){logger[_0xf68e('0x8')](util[_0xf68e('0x9')](_0xf68e('0xa'),_0x31e712,_0x57efc8,_0x5bf07c,_0x4bd6aa));}else{logger[_0xf68e('0xb')](util['format'](_0xf68e('0xc'),_0x31e712,_0x57efc8,_0x32156d));}});};