f93e73e835f2774e2307241925ceebd12eed91cd
[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 _0x1115=['get','show','download','post','create','/:id/messages','addMessage','/:id/tags','tracked','whatsapp','whatsappinteraction:addtags','addTags','put','/:id','update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','/describe'];(function(_0x486008,_0x2b2d05){var _0x2fefc7=function(_0x4177fe){while(--_0x4177fe){_0x486008['push'](_0x486008['shift']());}};_0x2fefc7(++_0x2b2d05);}(_0x1115,0x1b6));var _0x5111=function(_0x283bce,_0x2a85c2){_0x283bce=_0x283bce-0x0;var _0x901a3b=_0x1115[_0x283bce];return _0x901a3b;};'use strict';var multer=require('multer');var util=require(_0x5111('0x0'));var path=require(_0x5111('0x1'));var timeout=require(_0x5111('0x2'));var express=require(_0x5111('0x3'));var router=express[_0x5111('0x4')]();var fs_extra=require(_0x5111('0x5'));var auth=require(_0x5111('0x6'));var interaction=require(_0x5111('0x7'));var config=require(_0x5111('0x8'));var controller=require('./whatsappInteraction.controller');router['get']('/',auth[_0x5111('0x9')](),controller[_0x5111('0xa')]);router['get'](_0x5111('0xb'),auth[_0x5111('0x9')](),controller['describe']);router[_0x5111('0xc')]('/:id',auth[_0x5111('0x9')](),controller[_0x5111('0xd')]);router['get']('/:id/messages',auth[_0x5111('0x9')](),controller['getMessages']);router[_0x5111('0xc')]('/:id/download',auth[_0x5111('0x9')](),controller[_0x5111('0xe')]);router[_0x5111('0xf')]('/',auth[_0x5111('0x9')](),controller[_0x5111('0x10')]);router[_0x5111('0xf')](_0x5111('0x11'),auth[_0x5111('0x9')](),controller[_0x5111('0x12')]);router[_0x5111('0xf')](_0x5111('0x13'),auth[_0x5111('0x9')](),interaction[_0x5111('0x14')](_0x5111('0x15'),_0x5111('0x16')),controller[_0x5111('0x17')]);router[_0x5111('0x18')](_0x5111('0x19'),auth['isAuthenticated'](),interaction[_0x5111('0x14')]('whatsapp','whatsappinteraction:update'),controller[_0x5111('0x1a')]);router[_0x5111('0x1b')](_0x5111('0x19'),auth['isAuthenticated'](),interaction[_0x5111('0x14')](_0x5111('0x15'),'whatsappinteraction:destroy'),controller[_0x5111('0x1c')]);router[_0x5111('0x1b')](_0x5111('0x13'),auth[_0x5111('0x9')](),controller['removeTags']);module[_0x5111('0x1d')]=router;