4e8382c2e381625bae920c7c475adf07afccb437
[motion2.git] / server / api / whatsappInteraction / 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 _0x1623=['Router','fs-extra','../../components/auth/service','./whatsappInteraction.controller','isAuthenticated','index','/describe','describe','get','/:id','show','getMessages','/:id/download','download','post','create','/:id/tags','whatsapp','whatsappinteraction:addtags','addTags','tracked','whatsappinteraction:update','update','delete','destroy','exports','multer','connect-timeout','express'];(function(_0x1366b9,_0x323fce){var _0x353f57=function(_0x1fc12c){while(--_0x1fc12c){_0x1366b9['push'](_0x1366b9['shift']());}};_0x353f57(++_0x323fce);}(_0x1623,0xab));var _0x3162=function(_0x501579,_0x260440){_0x501579=_0x501579-0x0;var _0xf6d5e8=_0x1623[_0x501579];return _0xf6d5e8;};'use strict';var multer=require(_0x3162('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x3162('0x1'));var express=require(_0x3162('0x2'));var router=express[_0x3162('0x3')]();var fs_extra=require(_0x3162('0x4'));var auth=require(_0x3162('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x3162('0x6'));router['get']('/',auth[_0x3162('0x7')](),controller[_0x3162('0x8')]);router['get'](_0x3162('0x9'),auth[_0x3162('0x7')](),controller[_0x3162('0xa')]);router[_0x3162('0xb')](_0x3162('0xc'),auth[_0x3162('0x7')](),controller[_0x3162('0xd')]);router[_0x3162('0xb')]('/:id/messages',auth['isAuthenticated'](),controller[_0x3162('0xe')]);router[_0x3162('0xb')](_0x3162('0xf'),auth[_0x3162('0x7')](),controller[_0x3162('0x10')]);router[_0x3162('0x11')]('/',auth[_0x3162('0x7')](),controller[_0x3162('0x12')]);router[_0x3162('0x11')]('/:id/messages',auth[_0x3162('0x7')](),controller['addMessage']);router[_0x3162('0x11')](_0x3162('0x13'),auth['isAuthenticated'](),interaction['tracked'](_0x3162('0x14'),_0x3162('0x15')),controller[_0x3162('0x16')]);router['put'](_0x3162('0xc'),auth[_0x3162('0x7')](),interaction[_0x3162('0x17')]('whatsapp',_0x3162('0x18')),controller[_0x3162('0x19')]);router[_0x3162('0x1a')](_0x3162('0xc'),auth[_0x3162('0x7')](),interaction[_0x3162('0x17')](_0x3162('0x14'),'whatsappinteraction:destroy'),controller[_0x3162('0x1b')]);router[_0x3162('0x1a')](_0x3162('0x13'),auth[_0x3162('0x7')](),controller['removeTags']);module[_0x3162('0x1c')]=router;