1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x2e13=['changed','closed','closedAt','format','lodash','../../config/logger','moment','request-promise','path','../../config/environment','./whatsappInteraction.attributes','exports','define','WhatsappInteraction','whatsapp_interactions'];(function(_0x412e27,_0x20a978){var _0x53da42=function(_0x43cae5){while(--_0x43cae5){_0x412e27['push'](_0x412e27['shift']());}};_0x53da42(++_0x20a978);}(_0x2e13,0x1b7));var _0x32e1=function(_0x2f41b0,_0x2984a8){_0x2f41b0=_0x2f41b0-0x0;var _0x55396b=_0x2e13[_0x2f41b0];return _0x55396b;};'use strict';var _=require(_0x32e1('0x0'));var util=require('util');var logger=require(_0x32e1('0x1'))('api');var moment=require(_0x32e1('0x2'));var BPromise=require('bluebird');var rp=require(_0x32e1('0x3'));var fs=require('fs');var path=require(_0x32e1('0x4'));var rimraf=require('rimraf');var config=require(_0x32e1('0x5'));var attributes=require(_0x32e1('0x6'));module[_0x32e1('0x7')]=function(_0x378dbe,_0x3815d8){return _0x378dbe[_0x32e1('0x8')](_0x32e1('0x9'),attributes,{'tableName':_0x32e1('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2577a4,_0x11b47d,_0x2532b8){if(_0x2577a4[_0x32e1('0xb')](_0x32e1('0xc'))){_0x2577a4[_0x32e1('0xd')]=moment()[_0x32e1('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}_0x2532b8(null,_0x2577a4);}}});};