tango-app-api-trax 3.5.2-alpha-13 → 3.6.0-inditech-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,8 @@
1
1
 
2
2
 
3
- import { getchecklist, viewchecklist, getMobileUseagelist, storeOpencloselist, getcustomerunattendedlist, storesList, checklistDropdown, redoChecklist, redomultiChecklist, approveChecklist, approvalstatus, getLogs, headerStoresV2, teamsList, userList } from '../controllers/gallery.controller.js';
3
+ import { getchecklist, viewchecklist, getMobileUseagelist, storeOpencloselist, getcustomerunattendedlist,
4
+ storesList, checklistDropdown, redoChecklist, redomultiChecklist, approveChecklist,
5
+ approvalstatus, getLogs, headerStoresV2, teamsList, userList, checkNotificationCount } from '../controllers/gallery.controller.js';
4
6
  import express from 'express';
5
7
  export const galleryRouter = express.Router();
6
8
  import { validate, isAllowedSessionHandler, isAllowedClient, getAssinedStore } from 'tango-app-api-middleware';
@@ -26,10 +28,8 @@ galleryRouter
26
28
  .post( '/redo', isAllowedSessionHandler, redoChecklist )
27
29
  .post( '/multiredo', isAllowedSessionHandler, redomultiChecklist )
28
30
  .post( '/approvalstatus', isAllowedSessionHandler, approvalstatus )
29
- .post( '/getLogs', isAllowedSessionHandler, getLogs );
30
- galleryRouter
31
- .post( '/headerStores_v2', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateHeaderParamsv2 ), getAssinedStore, headerStoresV2 );
32
- galleryRouter
33
- .get( '/teamsList', isAllowedSessionHandler, isAllowedClient, teamsList );
34
- galleryRouter
35
- .post( '/userList', isAllowedSessionHandler, isAllowedClient, userList );
31
+ .post( '/getLogs', isAllowedSessionHandler, getLogs )
32
+ .post( '/headerStores_v2', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateHeaderParamsv2 ), getAssinedStore, headerStoresV2 )
33
+ .get( '/teamsList', isAllowedSessionHandler, isAllowedClient, teamsList )
34
+ .post( '/userList', isAllowedSessionHandler, isAllowedClient, userList )
35
+ .post( '/checkNotificationCount', isAllowedSessionHandler, getAssinedStore, checkNotificationCount );
@@ -23,6 +23,7 @@ internalTraxRouter
23
23
  .get( '/getDownloads', isAllowedInternalAPIHandler, internalController.getDownloads )
24
24
  .post( '/sendPushNotification', isAllowedInternalAPIHandler, internalController.internalSendPushNotification )
25
25
  .post( '/sendAiPushNotification', isAllowedInternalAPIHandler, internalController.internalAISendPushNotification )
26
- .post( '/getLiveChecklistClients', isAllowedInternalAPIHandler, internalController.getLiveChecklistClients );
26
+ .post( '/getLiveChecklistClients', isAllowedInternalAPIHandler, internalController.getLiveChecklistClients )
27
+ .post( '/notificationCreate', isAllowedInternalAPIHandler, internalController.notificationCreate );
27
28
 
28
29
 
@@ -0,0 +1,31 @@
1
+ import notificationModel from 'tango-api-schema/schema/notification.model.js';
2
+
3
+ export async function updateOnenotification( query, record ) {
4
+ return await notificationModel.updateOne( query, { $set: record } );
5
+ };
6
+
7
+ export async function updatenotification( query, record ) {
8
+ return await notificationModel.updateOne( query, record );
9
+ };
10
+ export async function updateManynotification( query, record ) {
11
+ return await notificationModel.updateMany( query, record );
12
+ };
13
+
14
+ export async function aggregatenotification( query ) {
15
+ return await notificationModel.aggregate( query );
16
+ };
17
+
18
+ export async function findOnenotification( query ={}, field={} ) {
19
+ return await notificationModel.findOne( query, field );
20
+ };
21
+ export async function findnotification( query ={}, field={} ) {
22
+ return await notificationModel.find( query, field );
23
+ };
24
+
25
+ export async function createnotificationModel( query ={}, field={} ) {
26
+ return await notificationModel.create( query, field );
27
+ };
28
+ export async function insertManynotificationModel( query ={}, field={} ) {
29
+ return await notificationModel.insertMany( query, field );
30
+ };
31
+