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 _0x98e5=['lodash','util','bluebird','request-promise','path','rimraf','define','WhatsappInteraction','whatsapp_interactions','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x5cb63c,_0x5d5b1b){var _0x3f352a=function(_0x5e7ff5){while(--_0x5e7ff5){_0x5cb63c['push'](_0x5cb63c['shift']());}};_0x3f352a(++_0x5d5b1b);}(_0x98e5,0x1d4));var _0x598e=function(_0x15d9ab,_0x10f6f0){_0x15d9ab=_0x15d9ab-0x0;var _0x51d0b1=_0x98e5[_0x15d9ab];return _0x51d0b1;};'use strict';var _=require(_0x598e('0x0'));var util=require(_0x598e('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x598e('0x2'));var rp=require(_0x598e('0x3'));var fs=require('fs');var path=require(_0x598e('0x4'));var rimraf=require(_0x598e('0x5'));var config=require('../../config/environment');var attributes=require('./whatsappInteraction.attributes');module['exports']=function(_0x1eca74,_0x510923){return _0x1eca74[_0x598e('0x6')](_0x598e('0x7'),attributes,{'tableName':_0x598e('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4c8e5f,_0x23925a,_0x36186f){if(_0x4c8e5f['changed'](_0x598e('0x9'))){_0x4c8e5f[_0x598e('0xa')]=moment()[_0x598e('0xb')](_0x598e('0xc'));}_0x36186f(null,_0x4c8e5f);}}});};