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