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