Skip to content

Commit

Permalink
fix: ninetailed: remove page support (#3218)
Browse files Browse the repository at this point in the history
  • Loading branch information
anantjain45823 authored Apr 1, 2024
1 parent 81290e8 commit 2f30c56
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 164 deletions.
4 changes: 0 additions & 4 deletions src/cdk/v2/destinations/ninetailed/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ const ConfigCategories = {
type: 'identify',
name: 'identifyMapping',
},
PAGE: {
type: 'page',
name: 'pageMapping',
},
};

// MAX_BATCH_SIZE : // Maximum number of events to send in a single batch
Expand Down
7 changes: 0 additions & 7 deletions src/cdk/v2/destinations/ninetailed/data/pageMapping.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/cdk/v2/destinations/ninetailed/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ steps:
template: |
let messageType = $.outputs.messageType;
$.assert(messageType, "message Type is not present. Aborting");
$.assert(messageType in {{$.EventType.([.TRACK,.IDENTIFY,.PAGE])}}, "message type " + messageType + " is not supported");
$.assert(messageType in {{$.EventType.([.TRACK,.IDENTIFY])}}, "message type " + messageType + " is not supported");
$.assertConfig(.destination.Config.organisationId, "Organisation ID is not present. Aborting");
$.assertConfig(.destination.Config.environment, "Environment is not present. Aborting");
- name: preparePayload
Expand Down
6 changes: 0 additions & 6 deletions src/cdk/v2/destinations/ninetailed/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ const constructFullPayload = (message) => {
config.mappingConfig[config.ConfigCategories.IDENTIFY.name],
);
break;
case 'page':
typeSpecifcPayload = constructPayload(
message,
config.mappingConfig[config.ConfigCategories.PAGE.name],
);
break;
default:
break;
}
Expand Down
3 changes: 1 addition & 2 deletions test/integrations/destinations/ninetailed/processor/data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { validationFailures } from './validation';
import { track } from './track';
import { page } from './page';
import { identify } from './identify';
export const data = [...identify, ...page, ...track, ...validationFailures];
export const data = [...identify, ...track, ...validationFailures];
108 changes: 0 additions & 108 deletions test/integrations/destinations/ninetailed/processor/page.ts

This file was deleted.

48 changes: 12 additions & 36 deletions test/integrations/destinations/ninetailed/router/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ export const data = [
metadata: { jobId: 1, userId: 'u1' },
destination,
},
{
message: {
...commonInput,
type: 'page',
properties: pageProperties,
},
metadata: { jobId: 2, userId: 'u1' },
destination,
},
{
message: {
type: 'identify',
Expand Down Expand Up @@ -80,11 +71,6 @@ export const data = [
event: 'product list viewed',
properties: trackProperties,
},
{
...commonOutput,
type: 'page',
properties: pageProperties,
},
{
type: 'identify',
...commonOutput,
Expand All @@ -103,7 +89,6 @@ export const data = [
},
metadata: [
{ jobId: 1, userId: 'u1' },
{ jobId: 2, userId: 'u1' },
{ jobId: 3, userId: 'u1' },
],
batched: true,
Expand Down Expand Up @@ -142,21 +127,9 @@ export const data = [
{
message: {
...commonInput,
type: 'page',
properties: {
title: 'Sample Page',
url: 'https://example.com/?utm_campaign=example_campaign&utm_content=example_content',
path: '/',
hash: '',
search: '?utm_campaign=example_campaign&utm_content=example_content',
width: '1920',
height: '1080',
query: {
utm_campaign: 'example_campaign',
utm_content: 'example_content',
},
referrer: '',
},
type: 'track',
event: 'product added',
properties: trackProperties,
},
metadata: { jobId: 2, userId: 'u1' },
destination,
Expand Down Expand Up @@ -210,8 +183,9 @@ export const data = [
},
{
...commonOutput,
type: 'page',
properties: pageProperties,
type: 'track',
event: 'product added',
properties: trackProperties,
},
],
},
Expand Down Expand Up @@ -264,8 +238,9 @@ export const data = [
{
message: {
...commonInput,
type: 'page',
properties: pageProperties,
type: 'track',
event: 'product added',
properties: trackProperties,
},
metadata: { jobId: 2, userId: 'u1' },
destination,
Expand Down Expand Up @@ -330,8 +305,9 @@ export const data = [
},
{
...commonOutput,
type: 'page',
properties: pageProperties,
type: 'track',
event: 'product added',
properties: trackProperties,
},
],
},
Expand Down

0 comments on commit 2f30c56

Please sign in to comment.