tango-app-api-client 3.3.3-beta.4 → 3.3.3-beta.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-client",
3
- "version": "3.3.3-beta.4",
3
+ "version": "3.3.3-beta.6",
4
4
  "description": "client",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "nodemon": "^3.0.3",
28
28
  "npm": "^10.9.1",
29
29
  "swagger-ui-express": "^5.0.0",
30
- "tango-api-schema": "^2.2.24",
30
+ "tango-api-schema": "^2.2.38",
31
31
  "tango-app-api-middleware": "3.1.43-alpha.10",
32
32
  "winston": "^3.11.0",
33
33
  "winston-daily-rotate-file": "^5.0.0"
@@ -396,7 +396,7 @@ export async function changeStatus( req, res, next ) {
396
396
 
397
397
  export async function getClients( req, res ) {
398
398
  try {
399
- const field = { clientName: 1, clientId: 1 };
399
+ const field = { clientName: 1, clientId: 1, traxDateRange: '$featureConfigs.traxDateRange' };
400
400
  let result = [];
401
401
  if ( req?.user?.role === 'superadmin' ) {
402
402
  result = await findClient( {}, field );
@@ -406,18 +406,6 @@ export async function getClients( req, res ) {
406
406
  $match: {
407
407
  userEmail: req?.user?.email,
408
408
  assignedType: { $eq: 'client' },
409
- // $expr: {
410
- // $cond: {
411
- // if: {
412
- // $and: [
413
- // { $eq: [ '$userType', 'tango' ] },
414
- // { $eq: [ '$tangoUserType', 'csm' ] },
415
- // ],
416
- // },
417
- // then: { $eq: [ '$isClientApproved', true ] },
418
- // else: true,
419
- // },
420
- // },
421
409
  },
422
410
  },
423
411
  {
@@ -451,9 +439,9 @@ export async function getClients( req, res ) {
451
439
  },
452
440
  {
453
441
  $project: {
454
- _id: 0,
455
442
  clientId: 1,
456
443
  clientName: 1,
444
+ traxDateRange: '$featureConfigs.traxDateRange',
457
445
  },
458
446
  },
459
447
  ];
@@ -123,6 +123,7 @@ export const featureConfigurationSchemaBody = joi.object(
123
123
  isControlCenter: joi.boolean().optional(),
124
124
  isFootfallDirectoryAudit: joi.boolean().optional(),
125
125
  isFootfallDirectoryLimit: joi.boolean().optional(),
126
+ streamBy: joi.string().optional(),
126
127
  },
127
128
  );
128
129
 
@@ -163,6 +163,7 @@ export function featureConfigurationUpdate( query, inputData ) {
163
163
  'featureConfigs.isControlCenter': inputData?.isControlCenter,
164
164
  'featureConfigs.isFootfallDirectoryAudit': inputData?.isFootfallDirectoryAudit,
165
165
  'featureConfigs.isFootfallDirectoryLimit': inputData?.isFootfallDirectoryLimit,
166
+ 'featureConfigs.streamBy': inputData?.streamBy,
166
167
  },
167
168
  } );
168
169
  }