tango-app-api-analysis-zone 3.0.0-alpha.22 → 3.0.0-alpha.24

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-analysis-zone",
3
- "version": "3.0.0-alpha.22",
3
+ "version": "3.0.0-alpha.24",
4
4
  "description": "zone Analysis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -238,7 +238,7 @@ export const trajectoryAnalysisV2 = async ( req, res ) => {
238
238
  export const trajectoryAnalysisRateV2 = async ( req, res ) => {
239
239
  try {
240
240
  let reqestData = req.body;
241
- let LamdaURL = 'https://h3xn5ktondejvwpaapkwb5wmbu0dqxop.lambda-url.ap-south-1.on.aws/%27';
241
+ let LamdaURL = 'https://h3xn5ktondejvwpaapkwb5wmbu0dqxop.lambda-url.ap-south-1.on.aws/';
242
242
  let resultData = await LamdaServiceCall( LamdaURL, reqestData );
243
243
  if ( resultData ) {
244
244
  if ( resultData.status_code == '200' ) {
@@ -257,11 +257,19 @@ export const trajectoryAnalysisRateV2 = async ( req, res ) => {
257
257
  export const customerJourneyV2 = async ( req, res ) => {
258
258
  try {
259
259
  let reqestData = req.body;
260
- let LamdaURL = '';
260
+ let LamdaURL = 'https://4hcktsbhhkmcvjtg4wdmvhopwi0mouqn.lambda-url.ap-south-1.on.aws/';
261
261
  let resultData = await LamdaServiceCall( LamdaURL, reqestData );
262
262
  if ( resultData ) {
263
263
  if ( resultData.status_code == '200' ) {
264
- return res.sendSuccess( resultData );
264
+ let customerJourneyData = resultData.customerJourneyData.zoneList; // ///
265
+ let newResultData = {};
266
+ newResultData.status_code = '200';
267
+ let newData = [];
268
+ for ( let i = 0; i < customerJourneyData.length; i++ ) {
269
+ newData.push( { 'from': customerJourneyData[i].from+' ('+customerJourneyData[i].fromCount+')', 'to': customerJourneyData[i].to+' ('+customerJourneyData[i].toCount+')', 'value': customerJourneyData[i].value } );
270
+ }
271
+ newResultData.customerJourneyData = newData;
272
+ return res.sendSuccess( newResultData );
265
273
  } else {
266
274
  return res.sendError( 'No Content', 204 );
267
275
  }
@@ -279,7 +287,7 @@ export const customerJourneyTableV2 = async ( req, res ) => {
279
287
  if ( reqestData.export ) {
280
288
  reqestData.limit = 1000;
281
289
  }
282
- let LamdaURL = '';
290
+ let LamdaURL = 'https://ac3wtvvvcb4g75hdtrdlldhnmi0pyxzq.lambda-url.ap-south-1.on.aws/';
283
291
  let resultData = await LamdaServiceCall( LamdaURL, reqestData );
284
292
  if ( resultData ) {
285
293
  if ( resultData.status_code == '200' ) {
@@ -192,6 +192,7 @@ export const validateCustomerJourneyV2Schema = joi.object( {
192
192
  limit: joi.number().required(),
193
193
  offset: joi.number().required(),
194
194
  export: joi.boolean().required(),
195
+ sortType: joi.string().required(),
195
196
  } );
196
197
 
197
198
  export const validateCustomerJourneyV2Params = {