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 _0x64eb=['bluebird','request-promise','path','rimraf','../../config/environment','./whatsappInteraction.attributes','exports','define','WhatsappInteraction','changed','closed','closedAt','format','lodash','util','../../config/logger','api','moment'];(function(_0x4faf9a,_0x3af773){var _0x30780e=function(_0x520669){while(--_0x520669){_0x4faf9a['push'](_0x4faf9a['shift']());}};_0x30780e(++_0x3af773);}(_0x64eb,0x109));var _0xb64e=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x64eb[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xb64e('0x0'));var util=require(_0xb64e('0x1'));var logger=require(_0xb64e('0x2'))(_0xb64e('0x3'));var moment=require(_0xb64e('0x4'));var BPromise=require(_0xb64e('0x5'));var rp=require(_0xb64e('0x6'));var fs=require('fs');var path=require(_0xb64e('0x7'));var rimraf=require(_0xb64e('0x8'));var config=require(_0xb64e('0x9'));var attributes=require(_0xb64e('0xa'));module[_0xb64e('0xb')]=function(_0x178dff,_0x496b53){return _0x178dff[_0xb64e('0xc')](_0xb64e('0xd'),attributes,{'tableName':'whatsapp_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1db4dd,_0x91bc34,_0x3b0b03){if(_0x1db4dd[_0xb64e('0xe')](_0xb64e('0xf'))){_0x1db4dd[_0xb64e('0x10')]=moment()[_0xb64e('0x11')]('YYYY-MM-DD\x20HH:mm:ss');}_0x3b0b03(null,_0x1db4dd);}}});};